Wicket
  1. Wicket
  2. WICKET-5208

Contribute jQuery 1.x or 2.x depending on the user agent

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 7.0.0-M1
    • Fix Version/s: 6.9.0, 7.0.0-M1
    • Component/s: wicket
    • Labels:
      None

      Description

      Wicket can use the ClientInfo to decide which version of jQuery do contribute - 2.0 works on all modern browsers (IE9+), while 1.x series still support IE 6/7/8.

      1. WICKET-5208.patch
        2 kB
        Martin Grigorov

        Activity

        Martin Grigorov created issue -
        Martin Grigorov made changes -
        Field Original Value New Value
        Summary Contribute jQuery 1.10 or 2.0 depending on the user agent Contribute jQuery 1.x or 2.x depending on the user agent
        Hide
        Martin Grigorov added a comment -

        Here is a possible solution.

        Show
        Martin Grigorov added a comment - Here is a possible solution.
        Martin Grigorov made changes -
        Attachment WICKET-5208.patch [ 12584978 ]
        Hide
        Martin Grigorov added a comment -

        DynamicJQueryResourceReference is added.
        To use it do:

        MyApp#init()

        { ... getJavaScriptLibrarySettings().setJQueryReference(DynamicJQueryResourceReference.INSTANCE); ... }
        Show
        Martin Grigorov added a comment - DynamicJQueryResourceReference is added. To use it do: MyApp#init() { ... getJavaScriptLibrarySettings().setJQueryReference(DynamicJQueryResourceReference.INSTANCE); ... }
        Martin Grigorov made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 7.0.0 [ 12322958 ]
        Resolution Fixed [ 1 ]
        Hide
        Martin Grigorov added a comment -

        To change the versions of jQuery use:

        public class CustomJQuery extends DynamicJQueryResourceReference
        {
        @Override
        protected String getVersion1()

        { return "jquery/jquery-1.11.0.min.js"; }

        @Override
        protected String getVersion2()

        { return "jquery/jquery-2.1.0.min.js"; }

        }

        getJavaScriptLibrarySettings().setJQueryReference(new CustomJQuery());

        Show
        Martin Grigorov added a comment - To change the versions of jQuery use: public class CustomJQuery extends DynamicJQueryResourceReference { @Override protected String getVersion1() { return "jquery/jquery-1.11.0.min.js"; } @Override protected String getVersion2() { return "jquery/jquery-2.1.0.min.js"; } } getJavaScriptLibrarySettings().setJQueryReference(new CustomJQuery());
        Martin Grigorov made changes -
        Fix Version/s 6.9.0 [ 12324357 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        9h 6m 1 Martin Grigorov 28/May/13 07:21

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Martin Grigorov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development