Edgewall Software

Changes between Initial Version and Version 1 of Ticket #12221, comment 5


Ignore:
Timestamp:
Sep 29, 2015, 10:58:33 AM (9 years ago)
Author:
Jun Omae

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12221, comment 5

    initial v1  
    11In my plugin, I use some jquery UI plugins + the jquery validation plugin.
    22
    3 I can not use chrome.add_jquery_ui() due to an incompatibility between the validator plugin and jquery-ui-i18n on this line:
     3I can not use `chrome.add_jquery_ui()` due to an incompatibility between the validator plugin and jquery-ui-i18n on this line:
     4{{{
    45  yearSuffix: $.format(formatMonth, {month: '', year: ''})
    5 (the validator plugin also defines a format() function)
     6}}}
     7(the validator plugin also defines a `format()` function)
    68
    7 So, in my plugin, I directly call add_script('common/js/jquery-ui.js').
     9So, in my plugin, I directly call `add_script('common/js/jquery-ui.js')`.
    810
    9 It was working with Trac 1.1, but it does no more work with Trac 1.2 due to the js script that you added in layout.html: an exception is thrown because datetimepicker() is unknown.
     11It was working with Trac 1.1, but it does no more work with Trac 1.2 due to the js script that you added in `layout.html`: an exception is thrown because `datetimepicker()` is unknown.
    1012
    11 The actual fix is obviously to now also add_script('/common/js/jquery-ui-addon.js') in my plugin.
     13The actual fix is obviously to now also `add_script('/common/js/jquery-ui-addon.js')` in my plugin.
    1214
    1315But, as a guard against such issue, I was thinking that adding a try/catch could be a fine protection.