5

I'm making a calendar for jquery mobile, I'm using the jquery weekcalendar (jQ wC), but the problem is, that jQ wC is using jquery UI, and this is in conflict with jquery mobile.

For this reason, I have removed everything UI related out of the jQ wC, but I'm stuck at the last part, and that is the widgets part.

It works like this: there is a jq wc CORE file, which initiates a widget, and a Impl file which points to this widget, and this file overwrites settings from the core file.

My question is: how can I get rid of the widgets, and still have this impl file overwrite the settings of the core?

The files can be found here:
http://pastebin.com/gswWRm8D
http://pastebin.com/2180H1Ve

edit I temporarily solved tihs, by stripping down the UI code, and only importing the widget part of jQuery UI (which is just 3kb, instead of importing the whole library: 200kb). I am however still looking for something to totally remove the library.

  • I think jQuery Mobile does use $.widget (or some form/port of it) - Look at the mobile / ui datepicker if it helps: http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker/ – aknosis Sep 10 '11 at 05:55
  • Well that's the UI widget system, as you can see in the source code of the datepicker, it is still using the jQuery UI library. Thanks for your effort any ways! – Timothy Beemster Sep 12 '11 at 14:59

2 Answers2

0

There are a few alternatives to jQUery UI, but I suggest you fix the conflicting problem rather than just switching libraries.

If you wish, though http://www.kendoui.com has been gaining a lot of attention lately.

wesbos
  • 25,839
  • 30
  • 106
  • 143
0

Since alpha2, jQuery Mobile has used the jQUI widget factory.

$.widget is jQUI, with $.mobile.widget extensions. If you've pulled all other UI dependent code out except for widget factory, changing the UI widget calls ui.weekCalendar to something more suitable (mobile.weekCalendar) should be all you need to do.

See http://jquerymobile.com/blog/2010/11/12/jquery-mobile-alpha-2-released/

All of the relevant jQuery Mobile widgets have moved over to building off of the jQuery UI Widget Factory. This gives us the ability to have greater extensibility and methods (such as the ability to disable controls). Specifically in this release Dialog, Form Buttons, listview, collapsible, Checkbox/Radio, textinput, slider / switch, Select menu, have all moved over to the widget factory, and we’re continuing to work on extending the methods and events those plugins provide.

Ben Wilson
  • 545
  • 3
  • 5