compass-jquery-plugin 0.3.3.0 → 0.3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. data/README.md +4 -4
  2. data/VERSION.yml +1 -1
  3. data/lib/handle_js_files.rb +1 -1
  4. data/lib/jquery/gridify/grid_column.rb +4 -0
  5. data/lib/jquery/gridify/grid_options.rb +5 -1
  6. data/lib/jquery/gridify/grid_view.rb +8 -3
  7. data/templates/dynatree/jquery.dynatree.js +184 -73
  8. data/templates/dynatree/jquery.dynatree.min.js +78 -76
  9. data/templates/emulators/emulators/galaxy.tab.7.7.landscape.png +0 -0
  10. data/templates/emulators/emulators/{palm.pre.2.landscape.scss → galaxy.tab.7.7.landscape.scss} +7 -7
  11. data/templates/emulators/emulators/galaxy.tab.7.7.portrait.png +0 -0
  12. data/templates/emulators/emulators/{palm.pre.2.portrait.scss → galaxy.tab.7.7.portrait.scss} +7 -7
  13. data/templates/emulators/manifest.rb +4 -4
  14. data/templates/graphics/config/initializers/graphics.rb +1 -1
  15. data/templates/graphics/highcharts/dark-blue.js +257 -159
  16. data/templates/graphics/highcharts/dark-blue.min.js +4 -2
  17. data/templates/graphics/highcharts/dark-green.js +257 -159
  18. data/templates/graphics/highcharts/dark-green.min.js +4 -2
  19. data/templates/graphics/highcharts/gray.js +252 -154
  20. data/templates/graphics/highcharts/gray.min.js +4 -2
  21. data/templates/graphics/highcharts/grid.js +84 -84
  22. data/templates/graphics/highcharts/highslide-full.min.js +3 -3
  23. data/templates/graphics/highcharts/highslide.js +3391 -0
  24. data/templates/graphics/highcharts/highslide.min.js +132 -0
  25. data/templates/graphics/jquery.ganttView.min.js +4 -4
  26. data/templates/graphics/jquery.highcharts.js +15379 -1071
  27. data/templates/graphics/jquery.highcharts.min.js +384 -167
  28. data/templates/graphics/jquery.sparkline.min.js +2 -2
  29. data/templates/graphics/manifest.rb +2 -0
  30. data/templates/ical/jquery.ical.min.js +46 -47
  31. data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +2 -2
  32. data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +2 -2
  33. data/templates/jqgrid/i18n/jqgrid/locale-fi.js +20 -19
  34. data/templates/jqgrid/i18n/jqgrid/locale-fi.min.js +7 -6
  35. data/templates/jqgrid/i18n/jqgrid/locale-is.js +28 -28
  36. data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +6 -6
  37. data/templates/jqgrid/i18n/jqgrid/locale-th.js +134 -0
  38. data/templates/jqgrid/i18n/jqgrid/locale-th.min.js +6 -0
  39. data/templates/jqgrid/jquery.jqGrid.js +674 -598
  40. data/templates/jqgrid/jquery.jqGrid.min.js +444 -441
  41. data/templates/jqgrid/jquery/jqGrid.scss +0 -3
  42. data/templates/jqgrid/manifest.rb +2 -0
  43. data/templates/jqtouch/jquery.jqtouch.js +201 -156
  44. data/templates/jqtouch/jquery.jqtouch.min.js +1 -1
  45. data/templates/jqtouch/jquery/touch/apple.scss +2 -2
  46. data/templates/jqtouch/jquery/touch/default.scss +2 -2
  47. data/templates/jquery/amplify.store.js +111 -78
  48. data/templates/jquery/amplify.store.min.js +6 -6
  49. data/templates/jquery/history.js +3 -3
  50. data/templates/jquery/i18n/jquery.ui/datepicker-nl.js +1 -1
  51. data/templates/jquery/i18n/jquery.ui/datepicker-nl.min.js +1 -1
  52. data/templates/jquery/jquery-ui.js +1286 -1042
  53. data/templates/jquery/jquery-ui.min.js +320 -316
  54. data/templates/jquery/jquery.contextMenu.js +2 -2
  55. data/templates/jquery/jquery.easing.js +152 -152
  56. data/templates/jquery/jquery.easing.min.js +7 -7
  57. data/templates/jquery/jquery.farbtastic.min.js +2 -2
  58. data/templates/jquery/jquery.form.js +30 -30
  59. data/templates/jquery/jquery.haml.min.js +5 -5
  60. data/templates/jquery/jquery.hotkeys.min.js +1 -1
  61. data/templates/jquery/jquery.js +419 -311
  62. data/templates/jquery/jquery.layout.js +59 -40
  63. data/templates/jquery/jquery.min.js +176 -176
  64. data/templates/jquery/jquery.themeswitchertool.js +37 -37
  65. data/templates/jquery/jquery.tmpl.js +4 -4
  66. data/templates/jquery/jquery.tmpl.min.js +9 -9
  67. data/templates/jquery/jquery.tmplPlus.min.js +3 -3
  68. data/templates/jquery/jquery.tokeninput.js +613 -490
  69. data/templates/jquery/jquery.tokeninput.min.js +17 -14
  70. data/templates/jquery/jquery/ui/_theme.scss +39 -63
  71. data/templates/jquery/json.js +31 -15
  72. data/templates/jstree/jquery.jstree.js +415 -410
  73. data/templates/jstree/jquery.jstree.min.js +134 -133
  74. data/templates/markitup/jquery.markitup.js +567 -560
  75. data/templates/markitup/jquery.markitup.min.js +1 -1
  76. data/templates/markitup/jquery/markitup/sets/default.scss +7 -3
  77. data/templates/markitup/jquery/markitup/sets/default/list-bullet.png +0 -0
  78. data/templates/markitup/jquery/markitup/sets/default/list-numeric.png +0 -0
  79. data/templates/markitup/jquery/markitup/skins/markitup.scss +3 -10
  80. data/templates/markitup/jquery/markitup/skins/markitup/bg-container.png +0 -0
  81. data/templates/markitup/jquery/markitup/skins/markitup/menu.png +0 -0
  82. data/templates/markitup/jquery/markitup/skins/simple.scss +2 -3
  83. data/templates/markitup/jquery/markitup/skins/simple/menu.png +0 -0
  84. data/templates/markitup/manifest.rb +2 -0
  85. data/templates/markitup/markitup/jquery.markitup.set.default.js +21 -21
  86. data/templates/markitup/markitup/jquery.markitup.set.default.min.js +3 -2
  87. data/templates/mobile/jquery.mobile.js +5230 -2846
  88. data/templates/mobile/jquery.mobile.min.js +192 -46
  89. data/templates/mobile/jquery/mobile/_base.scss +141 -18
  90. data/templates/mobile/jquery/mobile/default.scss +263 -66
  91. data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
  92. data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
  93. data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
  94. data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
  95. data/templates/mobile/jquery/mobile/valencia.scss +242 -53
  96. data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
  97. data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
  98. data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
  99. data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
  100. data/templates/tiny_mce/manifest.rb +2 -0
  101. data/templates/tiny_mce/tiny_mce/langs/de.js +1 -1
  102. data/templates/tiny_mce/tiny_mce/plugins/advhr/rule.htm +1 -1
  103. data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin.js +1 -1
  104. data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin_src.js +1 -1
  105. data/templates/tiny_mce/tiny_mce/plugins/advimage/image.htm +1 -1
  106. data/templates/tiny_mce/tiny_mce/plugins/advimage/js/image.js +1 -1
  107. data/templates/tiny_mce/tiny_mce/plugins/advlink/link.htm +1 -1
  108. data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin.js +1 -1
  109. data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin_src.js +1 -1
  110. data/templates/tiny_mce/tiny_mce/plugins/autolink/editor_plugin.js +1 -1
  111. data/templates/tiny_mce/tiny_mce/plugins/autolink/editor_plugin_src.js +1 -1
  112. data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin.js +1 -1
  113. data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin_src.js +1 -1
  114. data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin.js +1 -1
  115. data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin_src.js +1 -1
  116. data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -1
  117. data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin_src.js +1 -1
  118. data/templates/tiny_mce/tiny_mce/plugins/emotions/emotions.htm +1 -1
  119. data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
  120. data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
  121. data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
  122. data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
  123. data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
  124. data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
  125. data/templates/tiny_mce/tiny_mce/plugins/example/dialog.htm +1 -1
  126. data/templates/tiny_mce/tiny_mce/plugins/example_dependency/editor_plugin.js +1 -0
  127. data/templates/tiny_mce/tiny_mce/plugins/example_dependency/editor_plugin_src.js +1 -0
  128. data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin.js +1 -1
  129. data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin_src.js +1 -1
  130. data/templates/tiny_mce/tiny_mce/plugins/fullpage/fullpage.htm +1 -1
  131. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -1
  132. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +1 -1
  133. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
  134. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
  135. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
  136. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
  137. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
  138. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +1 -1
  139. data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/template.htm +1 -1
  140. data/templates/tiny_mce/tiny_mce/plugins/lists/editor_plugin.js +1 -1
  141. data/templates/tiny_mce/tiny_mce/plugins/lists/editor_plugin_src.js +1 -1
  142. data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin.js +1 -1
  143. data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin_src.js +1 -1
  144. data/templates/tiny_mce/tiny_mce/plugins/media/js/media.js +1 -1
  145. data/templates/tiny_mce/tiny_mce/plugins/media/langs/en_dlg.js +1 -1
  146. data/templates/tiny_mce/tiny_mce/plugins/media/media.htm +1 -1
  147. data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin.js +1 -1
  148. data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin_src.js +1 -1
  149. data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin.js +1 -1
  150. data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin_src.js +1 -1
  151. data/templates/tiny_mce/tiny_mce/plugins/paste/pastetext.htm +1 -1
  152. data/templates/tiny_mce/tiny_mce/plugins/paste/pasteword.htm +1 -1
  153. data/templates/tiny_mce/tiny_mce/plugins/preview/example.html +16 -17
  154. data/templates/tiny_mce/tiny_mce/plugins/preview/preview.html +9 -10
  155. data/templates/tiny_mce/tiny_mce/plugins/searchreplace/searchreplace.htm +1 -1
  156. data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -1
  157. data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin_src.js +1 -1
  158. data/templates/tiny_mce/tiny_mce/plugins/style/js/props.js +1 -1
  159. data/templates/tiny_mce/tiny_mce/plugins/style/props.htm +1 -1
  160. data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -1
  161. data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin_src.js +1 -1
  162. data/templates/tiny_mce/tiny_mce/plugins/table/cell.htm +1 -1
  163. data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin.js +1 -1
  164. data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin_src.js +1 -1
  165. data/templates/tiny_mce/tiny_mce/plugins/table/js/cell.js +1 -1
  166. data/templates/tiny_mce/tiny_mce/plugins/table/js/row.js +1 -1
  167. data/templates/tiny_mce/tiny_mce/plugins/table/langs/de_dlg.js +1 -1
  168. data/templates/tiny_mce/tiny_mce/plugins/table/langs/en_dlg.js +1 -1
  169. data/templates/tiny_mce/tiny_mce/plugins/table/merge_cells.htm +1 -1
  170. data/templates/tiny_mce/tiny_mce/plugins/table/row.htm +1 -1
  171. data/templates/tiny_mce/tiny_mce/plugins/table/table.htm +1 -1
  172. data/templates/tiny_mce/tiny_mce/plugins/template/blank.htm +1 -1
  173. data/templates/tiny_mce/tiny_mce/plugins/template/template.htm +1 -1
  174. data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin.js +1 -1
  175. data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin_src.js +1 -1
  176. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/abbr.htm +1 -1
  177. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/acronym.htm +1 -1
  178. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/attributes.htm +1 -1
  179. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/cite.htm +1 -1
  180. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/del.htm +1 -1
  181. data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/ins.htm +1 -1
  182. data/templates/tiny_mce/tiny_mce/themes/advanced/about.htm +1 -1
  183. data/templates/tiny_mce/tiny_mce/themes/advanced/anchor.htm +1 -1
  184. data/templates/tiny_mce/tiny_mce/themes/advanced/color_picker.htm +1 -1
  185. data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template.js +1 -1
  186. data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template_src.js +1 -1
  187. data/templates/tiny_mce/tiny_mce/themes/advanced/image.htm +1 -1
  188. data/templates/tiny_mce/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
  189. data/templates/tiny_mce/tiny_mce/themes/advanced/img/flash.gif +0 -0
  190. data/templates/tiny_mce/tiny_mce/themes/advanced/img/icons.gif +0 -0
  191. data/templates/tiny_mce/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
  192. data/templates/tiny_mce/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
  193. data/templates/tiny_mce/tiny_mce/themes/advanced/js/image.js +1 -1
  194. data/templates/tiny_mce/tiny_mce/themes/advanced/langs/de.js +1 -1
  195. data/templates/tiny_mce/tiny_mce/themes/advanced/link.htm +1 -1
  196. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/content.css +1 -1
  197. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/dialog.css +1 -1
  198. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
  199. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
  200. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
  201. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/ui.css +1 -1
  202. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +1 -1
  203. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/ui.css +1 -1
  204. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/content.css +1 -1
  205. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/dialog.css +1 -1
  206. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
  207. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
  208. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
  209. data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui.css +1 -1
  210. data/templates/tiny_mce/tiny_mce/themes/advanced/source_editor.htm +1 -1
  211. data/templates/tiny_mce/tiny_mce/themes/simple/img/icons.gif +0 -0
  212. data/templates/tiny_mce/tiny_mce/themes/simple/skins/default/ui.css +1 -1
  213. data/templates/tiny_mce/tiny_mce/themes/simple/skins/o2k7/ui.css +1 -1
  214. data/templates/tiny_mce/tiny_mce/tiny_mce.js +1 -1
  215. data/templates/tools/flowplayer.min.js +1 -1
  216. data/templates/tools/jquery.tools.js +17 -17
  217. data/templates/tools/jquery.tools.min.js +22 -22
  218. metadata +17 -9
  219. data/templates/emulators/emulators/palm.pre.2.landscape.png +0 -0
  220. data/templates/emulators/emulators/palm.pre.2.portrait.png +0 -0
@@ -1,14 +1,17 @@
1
- (function(b){var y={hintText:"Type in a search term",noResultsText:"No results",searchingText:"Searching...",deleteText:"×",searchDelay:300,minChars:1,tokenLimit:null,jsonContainer:null,method:"GET",contentType:"json",queryParam:"q",tokenDelimiter:",",preventDuplicates:!1,prePopulate:null,animateDropdown:!0,onResult:null,onAdd:null,onDelete:null},z={tokenList:"token-input-list",token:"token-input-token",tokenDelete:"token-input-delete-token",selectedToken:"token-input-selected-token",highlightedToken:"token-input-highlighted-token",
2
- dropdown:"token-input-dropdown",dropdownItem:"token-input-dropdown-item",dropdownItem2:"token-input-dropdown-item2",selectedDropdownItem:"token-input-selected-dropdown-item",inputToken:"token-input-input-token"},i={BEFORE:0,AFTER:1,END:2},f={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUMPAD_ENTER:108,COMMA:188};b.fn.tokenInput=function(f,i){var a=b.extend({},y,i||{});return this.each(function(){new b.TokenList(this,f,a)})};b.TokenList=
3
- function(J,w,a){function q(c,d){var e=b("<li><p>"+d+"</p></li>").addClass(a.classes.token).insertBefore(m);b("<span>"+a.deleteText+"</span>").addClass(a.classes.tokenDelete).appendTo(e).click(function(){E(b(this).parent());return!1});var j={id:c,name:d};b.data(e.get(0),"tokeninput",j);n=n.slice(0,k).concat([j]).concat(n.slice(k));k++;j=b.map(n,function(a){return a.id});u.val(j.join(a.tokenDelimiter));r+=1;return e}function F(c){var d=b.data(c.get(0),"tokeninput"),c=a.onAdd;if(r>0&&a.preventDuplicates){var e=
4
- null;s.children().each(function(){var a=b(this),c=b.data(a.get(0),"tokeninput");if(c&&c.id===d.id)return e=a,!1});if(e){v(e);m.insertAfter(e);g.focus();return}}q(d.id,d.name);a.tokenLimit!==null&&r>=a.tokenLimit?(g.hide(),o()):(g.focus(),g.val(""),o(),b.isFunction(c)&&c(d))}function v(c){c.addClass(a.classes.selectedToken);h=c.get(0);g.val("");o()}function t(c,b){c.removeClass(a.classes.selectedToken);h=null;b===i.BEFORE?(m.insertBefore(c),k--):b===i.AFTER?(m.insertAfter(c),k++):(m.appendTo(s),k=
5
- r);g.focus()}function E(c){var d=b.data(c.get(0),"tokeninput"),e=a.onDelete,j=c.prevAll().length;j>k&&j--;c.remove();h=null;g.focus();n=n.slice(0,j).concat(n.slice(j+1));j<k&&k--;c=b.map(n,function(a){return a.id});u.val(c.join(a.tokenDelimiter));r-=1;a.tokenLimit!==null&&g.show().val("").focus();b.isFunction(e)&&e(d)}function o(){p.hide().empty();l=null}function x(){p.css({position:"absolute",top:b(s).offset().top+b(s).outerHeight(),left:b(s).offset().left,zindex:999}).show()}function A(c,d){if(d&&
6
- d.length){p.empty();var e=b("<ul>").appendTo(p).mouseover(function(a){B(b(a.target).closest("li"))}).mousedown(function(a){F(b(a.target).closest("li"));return!1}).hide();b.each(d,function(d,g){var f=b("<li>"+g.name.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+c+")(?![^<>]*>)(?![^&;]+;)","gi"),"<b>$1</b>")+"</li>").appendTo(e);d%2?f.addClass(a.classes.dropdownItem):f.addClass(a.classes.dropdownItem2);d===0&&B(f);b.data(f.get(0),"tokeninput",{id:g.id,name:g.name})});x();a.animateDropdown?e.slideDown("fast"):
7
- e.show()}else a.noResultsText&&(p.html("<p>"+a.noResultsText+"</p>"),x())}function B(c){c&&(l&&(b(l).removeClass(a.classes.selectedDropdownItem),l=null),c.addClass(a.classes.selectedDropdownItem),l=c.get(0))}function G(){var c=g.val().toLowerCase();c&&c.length&&(h&&t(b(h),i.AFTER),c.length>=a.minChars?(a.searchingText&&(p.html("<p>"+a.searchingText+"</p>"),x()),clearTimeout(H),H=setTimeout(function(){y(c)},a.searchDelay)):o())}function y(c){var d=C.get(c);if(d)A(c,d);else if(a.url){var e={data:{}};
8
- a.url.indexOf("?")>-1?(d=a.url.split("?"),e.url=d[0],d=d[1].split("&"),b.each(d,function(a,c){var b=c.split("=");e.data[b[0]]=b[1]})):e.url=a.url;e.data[a.queryParam]=c;e.type=a.method;e.dataType=a.contentType;if(a.crossDomain)e.dataType="jsonp";e.success=function(d){b.isFunction(a.onResult)&&(d=a.onResult.call(this,d));C.add(c,a.jsonContainer?d[a.jsonContainer]:d);g.val().toLowerCase()===c&&A(c,a.jsonContainer?d[a.jsonContainer]:d)};b.ajax(e)}else a.local_data&&(d=b.grep(a.local_data,function(a){return a.name.toLowerCase().indexOf(c.toLowerCase())>
9
- -1}),b.isFunction(a.onResult)&&(d=a.onResult.call(this,d)),C.add(c,d),A(c,d))}if(typeof w==="string"){if(a.url=w,a.crossDomain===void 0)a.crossDomain=a.url.indexOf("://")===-1?!1:location.href.split(/\/+/g)[1]!==a.url.split(/\/+/g)[1]}else if(typeof w==="object")a.local_data=w;a.classes?a.classes=b.extend({},z,a.classes):a.theme?(a.classes={},b.each(z,function(c,b){a.classes[c]=b+"-"+a.theme})):a.classes=z;var n=[],r=0,C=new b.TokenList.Cache,H,D,g=b('<input type="text" autocomplete="off">').css({outline:"none"}).focus(function(){if((a.tokenLimit===
10
- null||a.tokenLimit!==r)&&a.hintText)p.html("<p>"+a.hintText+"</p>"),x()}).blur(function(){o()}).bind("keyup keydown blur update",function(){if(D!==(D=g.val())){var a=D.replace(/&/g,"&amp;").replace(/\s/g," ").replace(/</g,"&lt;").replace(/>/g,"&gt;");I.html(a);g.width(I.width()+30)}}).keydown(function(a){var d,e;switch(a.keyCode){case f.LEFT:case f.RIGHT:case f.UP:case f.DOWN:if(b(this).val())return d=null,d=a.keyCode===f.DOWN||a.keyCode===f.RIGHT?b(l).next():b(l).prev(),d.length&&B(d),!1;else d=
11
- m.prev(),e=m.next(),d.length&&d.get(0)===h||e.length&&e.get(0)===h?a.keyCode===f.LEFT||a.keyCode===f.UP?t(b(h),i.BEFORE):t(b(h),i.AFTER):(a.keyCode===f.LEFT||a.keyCode===f.UP)&&d.length?v(b(d.get(0))):(a.keyCode===f.RIGHT||a.keyCode===f.DOWN)&&e.length&&v(b(e.get(0)));break;case f.BACKSPACE:d=m.prev();if(b(this).val().length)b(this).val().length===1?o():setTimeout(function(){G()},5);else return h?E(b(h)):d.length&&v(b(d.get(0))),!1;break;case f.TAB:case f.ENTER:case f.NUMPAD_ENTER:case f.COMMA:if(l)return F(b(l)),
12
- !1;break;case f.ESCAPE:return o(),!0;default:String.fromCharCode(a.which)&&setTimeout(function(){G()},5)}}),u=b(J).hide().val("").focus(function(){g.focus()}).blur(function(){g.blur()}),h=null,k=0,l=null,s=b("<ul />").addClass(a.classes.tokenList).click(function(a){if((a=b(a.target).closest("li"))&&a.get(0)&&b.data(a.get(0),"tokeninput")){var d=h;h&&t(b(h),i.END);d===a.get(0)?t(a,i.END):v(a)}else h&&t(b(h),i.END),g.focus()}).mouseover(function(c){(c=b(c.target).closest("li"))&&h!==this&&c.addClass(a.classes.highlightedToken)}).mouseout(function(c){(c=
13
- b(c.target).closest("li"))&&h!==this&&c.removeClass(a.classes.highlightedToken)}).insertBefore(u),m=b("<li />").addClass(a.classes.inputToken).appendTo(s).append(g),p=b("<div>").addClass(a.classes.dropdown).appendTo("body").hide(),I=b("<tester/>").insertAfter(g).css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:g.css("fontSize"),fontFamily:g.css("fontFamily"),fontWeight:g.css("fontWeight"),letterSpacing:g.css("letterSpacing"),whiteSpace:"nowrap"});u.val("");(li_data=a.prePopulate||
14
- u.data("pre"))&&li_data.length&&b.each(li_data,function(a,b){q(b.id,b.name)})};b.TokenList.Cache=function(f){var i=b.extend({max_size:500},f),a={},q=0;this.add=function(b,f){q>i.max_size&&(a={},q=0);a[b]||(q+=1);a[b]=f};this.get=function(b){return a[b]}}})(jQuery);
1
+ (function(b){var A={method:"GET",queryParam:"q",searchDelay:300,minChars:1,propertyToSearch:"name",jsonContainer:null,contentType:"json",prePopulate:null,processPrePopulate:!1,hintText:"Type in a search term",noResultsText:"No results",searchingText:"Searching...",deleteText:"&times;",animateDropdown:!0,theme:null,resultsFormatter:function(b){return"<li>"+b[this.propertyToSearch]+"</li>"},tokenFormatter:function(b){return"<li><p>"+b[this.propertyToSearch]+"</p></li>"},tokenLimit:null,tokenDelimiter:",",
2
+ preventDuplicates:!1,tokenValue:"id",onResult:null,onAdd:null,onDelete:null,onReady:null,idPrefix:"token-input-"},B={tokenList:"token-input-list",token:"token-input-token",tokenDelete:"token-input-delete-token",selectedToken:"token-input-selected-token",highlightedToken:"token-input-highlighted-token",dropdown:"token-input-dropdown",dropdownItem:"token-input-dropdown-item",dropdownItem2:"token-input-dropdown-item2",selectedDropdownItem:"token-input-selected-dropdown-item",inputToken:"token-input-input-token"},
3
+ j={BEFORE:0,AFTER:1,END:2},e={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUMPAD_ENTER:108,COMMA:188},u={init:function(k,e){var a=b.extend({},A,e||{});return this.each(function(){b(this).data("tokenInputObject",new b.TokenList(this,k,a))})},clear:function(){this.data("tokenInputObject").clear();return this},add:function(b){this.data("tokenInputObject").add(b);return this},remove:function(b){this.data("tokenInputObject").remove(b);
4
+ return this},get:function(){return this.data("tokenInputObject").getTokens()}};b.fn.tokenInput=function(b){return u[b]?u[b].apply(this,Array.prototype.slice.call(arguments,1)):u.init.apply(this,arguments)};b.TokenList=function(k,l,a){function I(){a.tokenLimit!==null&&p>=a.tokenLimit&&(g.hide(),q())}function J(f){var d=a.tokenFormatter(f),d=b(d).addClass(a.classes.token).insertBefore(r);b("<span>"+a.deleteText+"</span>").addClass(a.classes.tokenDelete).appendTo(d).click(function(){y(b(this).parent());
5
+ i.change();return!1});var c={id:f.id};c[a.propertyToSearch]=f[a.propertyToSearch];b.data(d.get(0),"tokeninput",f);m=m.slice(0,n).concat([c]).concat(m.slice(n));n++;u(m,i);p+=1;a.tokenLimit!==null&&p>=a.tokenLimit&&(g.hide(),q());return d}function C(f){var d=a.onAdd;if(p>0&&a.preventDuplicates){var c=null;s.children().each(function(){var a=b(this),d=b.data(a.get(0),"tokeninput");if(d&&d.id===f.id)return c=a,!1});if(c){x(c);r.insertAfter(c);g.focus();return}}if(a.tokenLimit==null||p<a.tokenLimit)J(f),
6
+ I();g.val("");q();b.isFunction(d)&&d.call(i,f)}function x(b){b.addClass(a.classes.selectedToken);h=b.get(0);g.val("");q()}function v(b,d){b.removeClass(a.classes.selectedToken);h=null;d===j.BEFORE?(r.insertBefore(b),n--):d===j.AFTER?(r.insertAfter(b),n++):(r.appendTo(s),n=p);g.focus()}function y(f){var d=b.data(f.get(0),"tokeninput"),c=a.onDelete,w=f.prevAll().length;w>n&&w--;f.remove();h=null;g.focus();m=m.slice(0,w).concat(m.slice(w+1));w<n&&n--;u(m,i);p-=1;a.tokenLimit!==null&&g.show().val("").focus();
7
+ b.isFunction(c)&&c.call(i,d)}function u(f,d){var c=b.map(f,function(b){return b[a.tokenValue]});d.val(c.join(a.tokenDelimiter))}function q(){t.hide().empty();o=null}function z(){t.css({position:"absolute",top:b(s).offset().top+b(s).outerHeight(),left:b(s).offset().left,zindex:999}).show()}function D(f,d){if(d&&d.length){t.empty();var c=b("<ul>").appendTo(t).mouseover(function(a){E(b(a.target).closest("li"))}).mousedown(function(a){C(b(a.target).closest("li").data("tokeninput"));i.change();return!1}).hide();
8
+ b.each(d,function(d,g){var e=a.resultsFormatter(g),e=e.replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+g[a.propertyToSearch]+")(?![^<>]*>)(?![^&;]+;)","g"),g[a.propertyToSearch].replace(RegExp("(?![^&;]+;)(?!<[^<>]*)("+f+")(?![^<>]*>)(?![^&;]+;)","gi"),"<b>$1</b>")),e=b(e).appendTo(c);d%2?e.addClass(a.classes.dropdownItem):e.addClass(a.classes.dropdownItem2);d===0&&E(e);b.data(e.get(0),"tokeninput",g)});z();a.animateDropdown?c.slideDown("fast"):c.show()}else a.noResultsText&&(t.html("<p>"+a.noResultsText+
9
+ "</p>"),z())}function E(f){f&&(o&&(b(o).removeClass(a.classes.selectedDropdownItem),o=null),f.addClass(a.classes.selectedDropdownItem),o=f.get(0))}function K(){var f=g.val().toLowerCase();f&&f.length&&(h&&v(b(h),j.AFTER),f.length>=a.minChars?(a.searchingText&&(t.html("<p>"+a.searchingText+"</p>"),z()),clearTimeout(L),L=setTimeout(function(){A(f)},a.searchDelay)):q())}function A(f){var d=f+F(),c=G.get(d);if(c)D(f,c);else if(a.url){var c=F(),e={data:{}};c.indexOf("?")>-1?(c=c.split("?"),e.url=c[0],
10
+ c=c[1].split("&"),b.each(c,function(a,b){var f=b.split("=");e.data[f[0]]=f[1]})):e.url=c;e.data[a.queryParam]=f;e.type=a.method;e.dataType=a.contentType;if(a.crossDomain)e.dataType="jsonp";e.success=function(c){b.isFunction(a.onResult)&&(c=a.onResult.call(i,c));G.add(d,a.jsonContainer?c[a.jsonContainer]:c);g.val().toLowerCase()===f&&D(f,a.jsonContainer?c[a.jsonContainer]:c)};b.ajax(e)}else a.local_data&&(c=b.grep(a.local_data,function(b){return b[a.propertyToSearch].toLowerCase().indexOf(f.toLowerCase())>
11
+ -1}),b.isFunction(a.onResult)&&(c=a.onResult.call(i,c)),G.add(d,c),D(f,c))}function F(){var b=a.url;typeof a.url=="function"&&(b=a.url.call());return b}if(b.type(l)==="string"||b.type(l)==="function"){if(a.url=l,l=F(),a.crossDomain===void 0)a.crossDomain=l.indexOf("://")===-1?!1:location.href.split(/\/+/g)[1]!==l.split(/\/+/g)[1]}else if(typeof l==="object")a.local_data=l;a.classes?a.classes=b.extend({},B,a.classes):a.theme?(a.classes={},b.each(B,function(b,d){a.classes[b]=d+"-"+a.theme})):a.classes=
12
+ B;var m=[],p=0,G=new b.TokenList.Cache,L,H,g=b('<input type="text" autocomplete="off">').css({outline:"none"}).attr("id",a.idPrefix+k.id).focus(function(){if((a.tokenLimit===null||a.tokenLimit!==p)&&a.hintText)t.html("<p>"+a.hintText+"</p>"),z()}).blur(function(){q();b(this).val("")}).bind("keyup keydown blur update",function(){if(H!==(H=g.val())){var b=H.replace(/&/g,"&amp;").replace(/\s/g," ").replace(/</g,"&lt;").replace(/>/g,"&gt;");M.html(b);g.width(M.width()+30)}}).keydown(function(a){var d,
13
+ c;switch(a.keyCode){case e.LEFT:case e.RIGHT:case e.UP:case e.DOWN:if(b(this).val())return d=null,d=a.keyCode===e.DOWN||a.keyCode===e.RIGHT?b(o).next():b(o).prev(),d.length&&E(d),!1;else d=r.prev(),c=r.next(),d.length&&d.get(0)===h||c.length&&c.get(0)===h?a.keyCode===e.LEFT||a.keyCode===e.UP?v(b(h),j.BEFORE):v(b(h),j.AFTER):(a.keyCode===e.LEFT||a.keyCode===e.UP)&&d.length?x(b(d.get(0))):(a.keyCode===e.RIGHT||a.keyCode===e.DOWN)&&c.length&&x(b(c.get(0)));break;case e.BACKSPACE:d=r.prev();if(b(this).val().length)b(this).val().length===
14
+ 1?q():setTimeout(function(){K()},5);else return h?(y(b(h)),i.change()):d.length&&x(b(d.get(0))),!1;break;case e.TAB:case e.ENTER:case e.NUMPAD_ENTER:case e.COMMA:if(o)return C(b(o).data("tokeninput")),i.change(),!1;break;case e.ESCAPE:return q(),!0;default:String.fromCharCode(a.which)&&setTimeout(function(){K()},5)}}),i=b(k).hide().val("").focus(function(){g.focus()}).blur(function(){g.blur()}),h=null,n=0,o=null,s=b("<ul />").addClass(a.classes.tokenList).click(function(a){if((a=b(a.target).closest("li"))&&
15
+ a.get(0)&&b.data(a.get(0),"tokeninput")){var d=h;h&&v(b(h),j.END);d===a.get(0)?v(a,j.END):x(a)}else h&&v(b(h),j.END),g.focus()}).mouseover(function(f){(f=b(f.target).closest("li"))&&h!==this&&f.addClass(a.classes.highlightedToken)}).mouseout(function(f){(f=b(f.target).closest("li"))&&h!==this&&f.removeClass(a.classes.highlightedToken)}).insertBefore(i),r=b("<li />").addClass(a.classes.inputToken).appendTo(s).append(g),t=b("<div>").addClass(a.classes.dropdown).appendTo("body").hide(),M=b("<tester/>").insertAfter(g).css({position:"absolute",
16
+ top:-9999,left:-9999,width:"auto",fontSize:g.css("fontSize"),fontFamily:g.css("fontFamily"),fontWeight:g.css("fontWeight"),letterSpacing:g.css("letterSpacing"),whiteSpace:"nowrap"});i.val("");k=a.prePopulate||i.data("pre");a.processPrePopulate&&b.isFunction(a.onResult)&&(k=a.onResult.call(i,k));k&&k.length&&b.each(k,function(a,b){J(b);I()});b.isFunction(a.onReady)&&a.onReady.call();this.clear=function(){s.children("li").each(function(){b(this).children("input").length===0&&y(b(this))})};this.add=
17
+ function(a){C(a)};this.remove=function(a){s.children("li").each(function(){if(b(this).children("input").length===0){var d=b(this).data("tokeninput"),c=!0,e;for(e in a)if(a[e]!==d[e]){c=!1;break}c&&y(b(this))}})};this.getTokens=function(){return m}};b.TokenList.Cache=function(e){var l=b.extend({max_size:500},e),a={},j=0;this.add=function(b,e){j>l.max_size&&(a={},j=0);a[b]||(j+=1);a[b]=e};this.get=function(b){return a[b]}}})(jQuery);
@@ -1,5 +1,5 @@
1
1
  /*
2
- * jQuery UI CSS Framework 1.8.13
2
+ * jQuery UI CSS Framework 1.8.16
3
3
  *
4
4
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
5
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -83,7 +83,7 @@
83
83
 
84
84
 
85
85
  /*
86
- * jQuery UI Accordion 1.8.13
86
+ * jQuery UI Accordion 1.8.16
87
87
  *
88
88
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
89
89
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -137,7 +137,7 @@
137
137
 
138
138
 
139
139
  /*
140
- * jQuery UI Autocomplete 1.8.13
140
+ * jQuery UI Autocomplete 1.8.16
141
141
  *
142
142
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
143
143
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -156,7 +156,7 @@
156
156
  /* without this, the menu expands to 100% in IE6 */
157
157
 
158
158
  /*
159
- * jQuery UI Menu 1.8.13
159
+ * jQuery UI Menu 1.8.16
160
160
  *
161
161
  * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
162
162
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -196,7 +196,7 @@
196
196
 
197
197
 
198
198
  /*
199
- * jQuery UI Button 1.8.13
199
+ * jQuery UI Button 1.8.16
200
200
  *
201
201
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
202
202
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -292,7 +292,7 @@ button.ui-button::-moz-focus-inner {
292
292
 
293
293
 
294
294
  /*
295
- * jQuery UI Datepicker 1.8.13
295
+ * jQuery UI Datepicker 1.8.16
296
296
  *
297
297
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
298
298
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -426,7 +426,8 @@ button.ui-button::-moz-focus-inner {
426
426
 
427
427
  .ui-datepicker-row-break {
428
428
  clear: both;
429
- width: 100%; }
429
+ width: 100%;
430
+ font-size: 0em; }
430
431
 
431
432
  /* RTL support */
432
433
  .ui-datepicker-rtl {
@@ -491,7 +492,7 @@ button.ui-button::-moz-focus-inner {
491
492
 
492
493
 
493
494
  /*
494
- * jQuery UI Dialog 1.8.13
495
+ * jQuery UI Dialog 1.8.16
495
496
  *
496
497
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
497
498
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -627,7 +628,7 @@ button.ui-button::-moz-focus-inner {
627
628
 
628
629
 
629
630
  /*
630
- * jQuery UI Progressbar 1.8.13
631
+ * jQuery UI Progressbar 1.8.16
631
632
  *
632
633
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
633
634
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -645,7 +646,7 @@ button.ui-button::-moz-focus-inner {
645
646
 
646
647
 
647
648
  /*
648
- * jQuery UI Resizable 1.8.13
649
+ * jQuery UI Resizable 1.8.16
649
650
  *
650
651
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
651
652
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -660,11 +661,7 @@ button.ui-button::-moz-focus-inner {
660
661
  position: absolute;
661
662
  font-size: 0.1px;
662
663
  z-index: 99999;
663
- display: block;
664
- /* http://bugs.jqueryui.com/ticket/7233
665
- - Resizable: resizable handles fail to work in IE if transparent and content overlaps
666
- */
667
- background-image: url(data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=); }
664
+ display: block; }
668
665
 
669
666
  .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle {
670
667
  display: none; }
@@ -727,7 +724,7 @@ button.ui-button::-moz-focus-inner {
727
724
 
728
725
 
729
726
  /*
730
- * jQuery UI Selectable 1.8.13
727
+ * jQuery UI Selectable 1.8.16
731
728
  *
732
729
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
733
730
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -762,14 +759,21 @@ button.ui-button::-moz-focus-inner {
762
759
  .ui-selectmenu-menu {
763
760
  padding: 0;
764
761
  margin: 0;
765
- list-style: none;
766
762
  position: absolute;
767
763
  top: 0;
768
764
  display: none;
769
- overflow: auto;
770
765
  z-index: 1005; }
771
766
 
772
767
  /* z-index: 1005 to make selectmenu work with dialog */
768
+ .ui-selectmenu-menu ul {
769
+ padding: 0;
770
+ margin: 0;
771
+ list-style: none;
772
+ position: relative;
773
+ overflow: auto;
774
+ overflow-y: auto;
775
+ overflow-x: hidden; }
776
+
773
777
  .ui-selectmenu-open {
774
778
  display: block; }
775
779
 
@@ -795,7 +799,7 @@ button.ui-button::-moz-focus-inner {
795
799
  outline: none;
796
800
  text-decoration: none; }
797
801
 
798
- .ui-selectmenu-menu li.ui-state-disabled a {
802
+ .ui-selectmenu-menu li.ui-state-disabled a, .ui-state-disabled {
799
803
  cursor: default; }
800
804
 
801
805
  .ui-selectmenu-menu li.ui-selectmenu-hasIcon a,
@@ -852,9 +856,13 @@ button.ui-button::-moz-focus-inner {
852
856
  * html .ui-selectmenu-menu li a {
853
857
  position: relative; }
854
858
 
859
+ /* IE7 workaround (opacity disabled) */
860
+ *+html .ui-state-disabled, *+html .ui-state-disabled a {
861
+ color: silver; }
862
+
855
863
 
856
864
  /*
857
- * jQuery UI Slider 1.8.13
865
+ * jQuery UI Slider 1.8.16
858
866
  *
859
867
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
860
868
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -919,7 +927,7 @@ button.ui-button::-moz-focus-inner {
919
927
 
920
928
 
921
929
  /*
922
- * jQuery UI Tabs 1.8.13
930
+ * jQuery UI Tabs 1.8.16
923
931
  *
924
932
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
925
933
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -974,7 +982,7 @@ button.ui-button::-moz-focus-inner {
974
982
 
975
983
 
976
984
  /*
977
- * jQuery UI CSS Framework 1.8.13
985
+ * jQuery UI CSS Framework 1.8.16
978
986
  *
979
987
  * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
980
988
  * Dual licensed under the MIT or GPL Version 2 licenses.
@@ -1642,63 +1650,30 @@ button.ui-button::-moz-focus-inner {
1642
1650
  ----------------------------------*/
1643
1651
 
1644
1652
  /* Corner radius */
1645
- .ui-corner-tl {
1653
+ .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl {
1646
1654
  -moz-border-radius-topleft: $ui_cornerRadius;
1647
1655
  -webkit-border-top-left-radius: $ui_cornerRadius;
1656
+ -khtml-border-top-left-radius: $ui_cornerRadius;
1648
1657
  border-top-left-radius: $ui_cornerRadius; }
1649
1658
 
1650
- .ui-corner-tr {
1659
+ .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr {
1651
1660
  -moz-border-radius-topright: $ui_cornerRadius;
1652
1661
  -webkit-border-top-right-radius: $ui_cornerRadius;
1662
+ -khtml-border-top-right-radius: $ui_cornerRadius;
1653
1663
  border-top-right-radius: $ui_cornerRadius; }
1654
1664
 
1655
- .ui-corner-bl {
1665
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl {
1656
1666
  -moz-border-radius-bottomleft: $ui_cornerRadius;
1657
1667
  -webkit-border-bottom-left-radius: $ui_cornerRadius;
1668
+ -khtml-border-bottom-left-radius: $ui_cornerRadius;
1658
1669
  border-bottom-left-radius: $ui_cornerRadius; }
1659
1670
 
1660
- .ui-corner-br {
1661
- -moz-border-radius-bottomright: $ui_cornerRadius;
1662
- -webkit-border-bottom-right-radius: $ui_cornerRadius;
1663
- border-bottom-right-radius: $ui_cornerRadius; }
1664
-
1665
- .ui-corner-top {
1666
- -moz-border-radius-topleft: $ui_cornerRadius;
1667
- -webkit-border-top-left-radius: $ui_cornerRadius;
1668
- border-top-left-radius: $ui_cornerRadius;
1669
- -moz-border-radius-topright: $ui_cornerRadius;
1670
- -webkit-border-top-right-radius: $ui_cornerRadius;
1671
- border-top-right-radius: $ui_cornerRadius; }
1672
-
1673
- .ui-corner-bottom {
1674
- -moz-border-radius-bottomleft: $ui_cornerRadius;
1675
- -webkit-border-bottom-left-radius: $ui_cornerRadius;
1676
- border-bottom-left-radius: $ui_cornerRadius;
1671
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br {
1677
1672
  -moz-border-radius-bottomright: $ui_cornerRadius;
1678
1673
  -webkit-border-bottom-right-radius: $ui_cornerRadius;
1674
+ -khtml-border-bottom-right-radius: $ui_cornerRadius;
1679
1675
  border-bottom-right-radius: $ui_cornerRadius; }
1680
1676
 
1681
- .ui-corner-right {
1682
- -moz-border-radius-topright: $ui_cornerRadius;
1683
- -webkit-border-top-right-radius: $ui_cornerRadius;
1684
- border-top-right-radius: $ui_cornerRadius;
1685
- -moz-border-radius-bottomright: $ui_cornerRadius;
1686
- -webkit-border-bottom-right-radius: $ui_cornerRadius;
1687
- border-bottom-right-radius: $ui_cornerRadius; }
1688
-
1689
- .ui-corner-left {
1690
- -moz-border-radius-topleft: $ui_cornerRadius;
1691
- -webkit-border-top-left-radius: $ui_cornerRadius;
1692
- border-top-left-radius: $ui_cornerRadius;
1693
- -moz-border-radius-bottomleft: $ui_cornerRadius;
1694
- -webkit-border-bottom-left-radius: $ui_cornerRadius;
1695
- border-bottom-left-radius: $ui_cornerRadius; }
1696
-
1697
- .ui-corner-all {
1698
- -moz-border-radius: $ui_cornerRadius;
1699
- -webkit-border-radius: $ui_cornerRadius;
1700
- border-radius: $ui_cornerRadius; }
1701
-
1702
1677
  /* Overlays */
1703
1678
  .ui-widget-overlay {
1704
1679
  background: $ui_bgColorOverlay $ui_bgImgUrlOverlay $ui_bgOverlayXPos $ui_bgOverlayYPos $ui_bgOverlayRepeat;
@@ -1712,6 +1687,7 @@ button.ui-button::-moz-focus-inner {
1712
1687
  opacity: $ui_bgShadowOpacity;
1713
1688
  filter: $ui_bgShadowFilter;
1714
1689
  -moz-border-radius: $ui_cornerRadiusShadow;
1690
+ -khtml-border-radius: $ui_cornerRadiusShadow;
1715
1691
  -webkit-border-radius: $ui_cornerRadiusShadow;
1716
1692
  border-radius: $ui_cornerRadiusShadow; }
1717
1693
 
@@ -27,20 +27,36 @@ if (!this.JSON)this.JSON = {};
27
27
  var d,g,j = f,e,b = c[a];
28
28
  if (b && typeof b === "object" && typeof b.toJSON === "function")b = b.toJSON(a);
29
29
  if (typeof i === "function")b = i.call(c, a, b);
30
- switch (typeof b) {case "string":return p(b);case "number":return isFinite(b) ? String(b) : "null";case "boolean":case "null":return String(b);case "object":if (!b)return"null";f += l;e = [];if (Object.prototype.toString.apply(b) === "[object Array]") {
31
- g = b.length;
32
- for (a = 0; a < g; a += 1)e[a] = m(a, b) || "null";
33
- c = e.length === 0 ? "[]" : f ? "[\n" + f + e.join(",\n" + f) + "\n" + j + "]" : "[" + e.join(",") + "]";
34
- f = j;
35
- return c
36
- }if (i && typeof i === "object") {
37
- g = i.length;
38
- for (a = 0; a < g; a += 1) {
39
- d = i[a];
40
- if (typeof d === "string")if (c =
41
- m(d, b))e.push(p(d) + (f ? ": " : ":") + c)
42
- }
43
- } else for (d in b)if (Object.hasOwnProperty.call(b, d))if (c = m(d, b))e.push(p(d) + (f ? ": " : ":") + c);c = e.length === 0 ? "{}" : f ? "{\n" + f + e.join(",\n" + f) + "\n" + j + "}" : "{" + e.join(",") + "}";f = j;return c
30
+ switch (typeof b) {
31
+ case "string":
32
+ return p(b);
33
+ case "number":
34
+ return isFinite(b) ? String(b) : "null";
35
+ case "boolean":
36
+ case "null":
37
+ return String(b);
38
+ case "object":
39
+ if (!b)return"null";
40
+ f += l;
41
+ e = [];
42
+ if (Object.prototype.toString.apply(b) === "[object Array]") {
43
+ g = b.length;
44
+ for (a = 0; a < g; a += 1)e[a] = m(a, b) || "null";
45
+ c = e.length === 0 ? "[]" : f ? "[\n" + f + e.join(",\n" + f) + "\n" + j + "]" : "[" + e.join(",") + "]";
46
+ f = j;
47
+ return c
48
+ }
49
+ if (i && typeof i === "object") {
50
+ g = i.length;
51
+ for (a = 0; a < g; a += 1) {
52
+ d = i[a];
53
+ if (typeof d === "string")if (c =
54
+ m(d, b))e.push(p(d) + (f ? ": " : ":") + c)
55
+ }
56
+ } else for (d in b)if (Object.hasOwnProperty.call(b, d))if (c = m(d, b))e.push(p(d) + (f ? ": " : ":") + c);
57
+ c = e.length === 0 ? "{}" : f ? "{\n" + f + e.join(",\n" + f) + "\n" + j + "}" : "{" + e.join(",") + "}";
58
+ f = j;
59
+ return c
44
60
  }
45
61
  }
46
62
 
@@ -50,7 +66,7 @@ if (!this.JSON)this.JSON = {};
50
66
  if (typeof d === "number")for (g = 0; g < d; g += 1)l += " "; else if (typeof d === "string")l = d;
51
67
  if ((i = c) && typeof c !== "function" && (typeof c !== "object" || typeof c.length !== "number"))throw new Error("JSON.stringify");
52
68
  return m("",
53
- {"":a})
69
+ {"":a})
54
70
  };
55
71
  if (typeof JSON.parse !== "function")JSON.parse = function(a, c) {
56
72
  function d(g, j) {
@@ -8,8 +8,8 @@
8
8
  * http://www.opensource.org/licenses/mit-license.php
9
9
  * http://www.gnu.org/licenses/gpl.html
10
10
  *
11
- * $Date: 2010-11-13 18:30:11 +0100 (Sa, 13. Nov 2010) $
12
- * $Revision: 233 $
11
+ * $Date: 2011-02-09 01:17:14 +0200 (ср, 09 февр 2011) $
12
+ * $Revision: 236 $
13
13
  */
14
14
 
15
15
  /*jslint browser: true, onevar: true, undef: true, bitwise: true, strict: true */
@@ -24,8 +24,7 @@
24
24
  }
25
25
  var is_ie6 = false, is_ie7 = false, is_ff2 = false;
26
26
 
27
-
28
- /*
27
+ /*
29
28
  * jsTree core
30
29
  */
31
30
  (function ($) {
@@ -126,9 +125,9 @@
126
125
  };
127
126
 
128
127
  // private variables
129
- var instances = [], // instance array (used by $.jstree.reference/create/focused)
130
- focused_instance = -1, // the index in the instance array of the currently focused instance
131
- plugins = {}, // list of included plugins
128
+ var instances = [], // instance array (used by $.jstree.reference/create/focused)
129
+ focused_instance = -1, // the index in the instance array of the currently focused instance
130
+ plugins = {}, // list of included plugins
132
131
  prepared_move = {}; // for the move_node function
133
132
 
134
133
  // jQuery plugin wrapper (thanks to jquery UI widget function)
@@ -143,9 +142,9 @@
143
142
  return returnValue;
144
143
  }
145
144
  this.each(function() {
146
- var instance = instances[$.data(this, "jstree-instance-id")],
145
+ var instance = instances[$.data(this, "jstree_instance_id")],
147
146
  methodValue = (instance && $.isFunction(instance[settings])) ? instance[settings].apply(instance, args) : instance;
148
- if (typeof methodValue !== "undefined" && (settings.indexOf("is_" === 0) || (methodValue !== true && methodValue !== false))) {
147
+ if (typeof methodValue !== "undefined" && (settings.indexOf("is_") === 0 || (methodValue !== true && methodValue !== false))) {
149
148
  returnValue = methodValue;
150
149
  return false;
151
150
  }
@@ -154,7 +153,7 @@
154
153
  else {
155
154
  this.each(function() {
156
155
  // extend settings and allow for multiple hashes and $.data
157
- var instance_id = $.data(this, "jstree-instance-id"),
156
+ var instance_id = $.data(this, "jstree_instance_id"),
158
157
  a = [],
159
158
  b = settings ? $.extend({}, true, settings) : {},
160
159
  c = $(this),
@@ -173,7 +172,7 @@
173
172
  // push a new empty object to the instances array
174
173
  instance_id = parseInt(instances.push({}), 10) - 1;
175
174
  // store the jstree instance id to the container element
176
- $.data(this, "jstree-instance-id", instance_id);
175
+ $.data(this, "jstree_instance_id", instance_id);
177
176
  // clean up all plugins
178
177
  b.plugins = $.isArray(b.plugins) ? b.plugins : $.jstree.defaults.plugins.slice();
179
178
  b.plugins.unshift("core");
@@ -207,7 +206,9 @@
207
206
  });
208
207
  // initialize the instance
209
208
  setTimeout(function() {
210
- instances[instance_id].init();
209
+ if (instances[instance_id]) {
210
+ instances[instance_id].init();
211
+ }
211
212
  }, 0);
212
213
  });
213
214
  }
@@ -235,7 +236,7 @@
235
236
  if (!o.length) {
236
237
  return null;
237
238
  }
238
- return instances[o.closest(".jstree").data("jstree-instance-id")] || null;
239
+ return instances[o.closest(".jstree").data("jstree_instance_id")] || null;
239
240
  },
240
241
  _instance : function (index, container, settings) {
241
242
  // for plugins to store data in
@@ -262,10 +263,10 @@
262
263
  _fn : { },
263
264
  plugin : function (pname, pdata) {
264
265
  pdata = $.extend({}, {
265
- __init : $.noop,
266
- __destroy : $.noop,
267
- _fn : {},
268
- defaults : false
266
+ __init : $.noop,
267
+ __destroy : $.noop,
268
+ _fn : {},
269
+ defaults : false
269
270
  }, pdata);
270
271
  plugins[pname] = pdata;
271
272
 
@@ -410,22 +411,22 @@
410
411
  this.data.core.to_load = this.get_settings().core.initially_load;
411
412
  },
412
413
  defaults : {
413
- html_titles : false,
414
- animation : 500,
414
+ html_titles : false,
415
+ animation : 500,
415
416
  initially_open : [],
416
417
  initially_load : [],
417
418
  open_parents : true,
418
419
  notify_plugins : true,
419
- rtl : false,
420
- load_open : false,
421
- strings : {
422
- loading : "Loading ...",
423
- new_node : "New node",
420
+ rtl : false,
421
+ load_open : false,
422
+ strings : {
423
+ loading : "Loading ...",
424
+ new_node : "New node",
424
425
  multiple_selection : "Multiple selection"
425
426
  }
426
427
  },
427
428
  _fn : {
428
- init : function () {
429
+ init : function () {
429
430
  this.set_focus();
430
431
  if (this._get_settings().core.rtl) {
431
432
  this.get_container().addClass("jstree-rtl").css("direction", "rtl");
@@ -436,29 +437,28 @@
436
437
  this.get_container()
437
438
  .delegate("li > ins", "click.jstree", $.proxy(function (event) {
438
439
  var trgt = $(event.target);
439
- if (trgt.is("ins") && event.pageY - trgt.offset().top < this.data.core.li_height) {
440
- this.toggle_node(trgt);
441
- }
440
+ // if(trgt.is("ins") && event.pageY - trgt.offset().top < this.data.core.li_height) { this.toggle_node(trgt); }
441
+ this.toggle_node(trgt);
442
442
  }, this))
443
443
  .bind("mousedown.jstree", $.proxy(function () {
444
444
  this.set_focus(); // This used to be setTimeout(set_focus,0) - why?
445
445
  }, this))
446
446
  .bind("dblclick.jstree", function (event) {
447
- var sel;
448
- if (document.selection && document.selection.empty) {
449
- document.selection.empty();
450
- }
451
- else {
452
- if (window.getSelection) {
453
- sel = window.getSelection();
454
- try {
455
- sel.removeAllRanges();
456
- sel.collapse();
457
- } catch (err) {
458
- }
459
- }
460
- }
461
- });
447
+ var sel;
448
+ if (document.selection && document.selection.empty) {
449
+ document.selection.empty();
450
+ }
451
+ else {
452
+ if (window.getSelection) {
453
+ sel = window.getSelection();
454
+ try {
455
+ sel.removeAllRanges();
456
+ sel.collapse();
457
+ } catch (err) {
458
+ }
459
+ }
460
+ }
461
+ });
462
462
  if (this._get_settings().core.notify_plugins) {
463
463
  this.get_container()
464
464
  .bind("load_node.jstree", $.proxy(function (e, data) {
@@ -504,7 +504,7 @@
504
504
  this.reload_nodes();
505
505
  });
506
506
  },
507
- destroy : function () {
507
+ destroy : function () {
508
508
  var i,
509
509
  n = this.get_index(),
510
510
  s = this._get_settings(),
@@ -534,12 +534,12 @@
534
534
  this.get_container()
535
535
  .unbind(".jstree")
536
536
  .undelegate(".jstree")
537
- .removeData("jstree-instance-id")
537
+ .removeData("jstree_instance_id")
538
538
  .find("[class^='jstree']")
539
539
  .andSelf()
540
540
  .attr("class", function () {
541
- return this.className.replace(/jstree[^ ]*|$/ig, '');
542
- });
541
+ return this.className.replace(/jstree[^ ]*|$/ig, '');
542
+ });
543
543
  $(document)
544
544
  .unbind(".jstree-" + n)
545
545
  .undelegate(".jstree-" + n);
@@ -572,7 +572,7 @@
572
572
  this.data.core.to_open = [];
573
573
  this.get_container_ul().find("li.jstree-open").each(function () {
574
574
  if (this.id) {
575
- _this.data.core.to_open.push("#" + this.id.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\."));
575
+ _this.data.core.to_open.push("#" + this.id.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.").replace(/\:/g, "\\:"));
576
576
  }
577
577
  });
578
578
  this.__callback(_this.data.core.to_open);
@@ -588,10 +588,10 @@
588
588
  this.data.core.reopen = false;
589
589
  this.data.core.refreshing = true;
590
590
  this.data.core.to_open = $.map($.makeArray(this.data.core.to_open), function (n) {
591
- return "#" + n.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.");
591
+ return "#" + n.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.").replace(/\:/g, "\\:");
592
592
  });
593
593
  this.data.core.to_load = $.map($.makeArray(this.data.core.to_load), function (n) {
594
- return "#" + n.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.");
594
+ return "#" + n.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.").replace(/\:/g, "\\:");
595
595
  });
596
596
  if (this.data.core.to_open.length) {
597
597
  this.data.core.to_load = this.data.core.to_load.concat(this.data.core.to_open);
@@ -662,17 +662,20 @@
662
662
  if (obj !== -1) {
663
663
  obj.children("UL").remove();
664
664
  }
665
+ else {
666
+ this.get_container_ul().empty();
667
+ }
665
668
  this.load_node(obj, function () {
666
669
  _this.__callback({ "obj" : obj});
667
670
  _this.reload_nodes();
668
671
  });
669
672
  },
670
673
  // Dummy function to fire after the first load (so that there is a jstree.loaded event)
671
- loaded : function () {
674
+ loaded : function () {
672
675
  this.__callback();
673
676
  },
674
677
  // deal with focus
675
- set_focus : function () {
678
+ set_focus : function () {
676
679
  if (this.is_focused()) {
677
680
  return;
678
681
  }
@@ -685,10 +688,10 @@
685
688
  focused_instance = this.get_index();
686
689
  this.__callback();
687
690
  },
688
- is_focused : function () {
691
+ is_focused : function () {
689
692
  return focused_instance == this.get_index();
690
693
  },
691
- unset_focus : function () {
694
+ unset_focus : function () {
692
695
  if (this.is_focused()) {
693
696
  this.get_container().removeClass("jstree-focused");
694
697
  focused_instance = -1;
@@ -697,7 +700,7 @@
697
700
  },
698
701
 
699
702
  // traverse
700
- _get_node : function (obj) {
703
+ _get_node : function (obj) {
701
704
  var $obj = $(obj, this.get_container());
702
705
  if ($obj.is(".jstree") || obj == -1) {
703
706
  return -1;
@@ -705,7 +708,7 @@
705
708
  $obj = $obj.closest("li", this.get_container());
706
709
  return $obj.length ? $obj : false;
707
710
  },
708
- _get_next : function (obj, strict) {
711
+ _get_next : function (obj, strict) {
709
712
  obj = this._get_node(obj);
710
713
  if (obj === -1) {
711
714
  return this.get_container().find("> ul > li:first-child");
@@ -727,7 +730,7 @@
727
730
  return obj.parentsUntil(".jstree", "li").next("li").eq(0);
728
731
  }
729
732
  },
730
- _get_prev : function (obj, strict) {
733
+ _get_prev : function (obj, strict) {
731
734
  obj = this._get_node(obj);
732
735
  if (obj === -1) {
733
736
  return this.get_container().find("> ul > li:last-child");
@@ -751,7 +754,7 @@
751
754
  return o.length ? o : false;
752
755
  }
753
756
  },
754
- _get_parent : function (obj) {
757
+ _get_parent : function (obj) {
755
758
  obj = this._get_node(obj);
756
759
  if (obj == -1 || !obj.length) {
757
760
  return false;
@@ -759,7 +762,7 @@
759
762
  var o = obj.parentsUntil(".jstree", "li:eq(0)");
760
763
  return o.length ? o : -1;
761
764
  },
762
- _get_children : function (obj) {
765
+ _get_children : function (obj) {
763
766
  obj = this._get_node(obj);
764
767
  if (obj === -1) {
765
768
  return this.get_container().children("ul:eq(0)").children("li");
@@ -769,7 +772,7 @@
769
772
  }
770
773
  return obj.children("ul:eq(0)").children("li");
771
774
  },
772
- get_path : function (obj, id_mode) {
775
+ get_path : function (obj, id_mode) {
773
776
  var p = [],
774
777
  _this = this;
775
778
  obj = this._get_node(obj);
@@ -789,19 +792,19 @@
789
792
  return this._get_settings().core.strings[key] || key;
790
793
  },
791
794
 
792
- is_open : function (obj) {
795
+ is_open : function (obj) {
793
796
  obj = this._get_node(obj);
794
797
  return obj && obj !== -1 && obj.hasClass("jstree-open");
795
798
  },
796
- is_closed : function (obj) {
799
+ is_closed : function (obj) {
797
800
  obj = this._get_node(obj);
798
801
  return obj && obj !== -1 && obj.hasClass("jstree-closed");
799
802
  },
800
- is_leaf : function (obj) {
803
+ is_leaf : function (obj) {
801
804
  obj = this._get_node(obj);
802
805
  return obj && obj !== -1 && obj.hasClass("jstree-leaf");
803
806
  },
804
- correct_state : function (obj) {
807
+ correct_state : function (obj) {
805
808
  obj = this._get_node(obj);
806
809
  if (!obj || obj === -1) {
807
810
  return false;
@@ -810,7 +813,7 @@
810
813
  this.__callback({ "obj" : obj });
811
814
  },
812
815
  // open/close
813
- open_node : function (obj, callback, skip_animation) {
816
+ open_node : function (obj, callback, skip_animation) {
814
817
  obj = this._get_node(obj);
815
818
  if (!obj.length) {
816
819
  return false;
@@ -854,10 +857,10 @@
854
857
  }
855
858
  }
856
859
  },
857
- after_open : function (obj) {
860
+ after_open : function (obj) {
858
861
  this.__callback({ "obj" : obj });
859
862
  },
860
- close_node : function (obj, skip_animation) {
863
+ close_node : function (obj, skip_animation) {
861
864
  obj = this._get_node(obj);
862
865
  var s = skip_animation || is_ie6 ? 0 : this._get_settings().core.animation,
863
866
  t = this;
@@ -879,10 +882,10 @@
879
882
  }
880
883
  this.__callback({ "obj" : obj });
881
884
  },
882
- after_close : function (obj) {
885
+ after_close : function (obj) {
883
886
  this.__callback({ "obj" : obj });
884
887
  },
885
- toggle_node : function (obj) {
888
+ toggle_node : function (obj) {
886
889
  obj = this._get_node(obj);
887
890
  if (obj.hasClass("jstree-closed")) {
888
891
  return this.open_node(obj);
@@ -891,7 +894,7 @@
891
894
  return this.close_node(obj);
892
895
  }
893
896
  },
894
- open_all : function (obj, do_animation, original_obj) {
897
+ open_all : function (obj, do_animation, original_obj) {
895
898
  obj = obj ? this._get_node(obj) : -1;
896
899
  if (!obj || obj === -1) {
897
900
  obj = this.get_container_ul();
@@ -925,7 +928,7 @@
925
928
  this.__callback({ "obj" : original_obj });
926
929
  }
927
930
  },
928
- close_all : function (obj, do_animation) {
931
+ close_all : function (obj, do_animation) {
929
932
  var _this = this;
930
933
  obj = obj ? this._get_node(obj) : this.get_container();
931
934
  if (!obj || obj === -1) {
@@ -936,7 +939,7 @@
936
939
  });
937
940
  this.__callback({ "obj" : obj });
938
941
  },
939
- clean_node : function (obj) {
942
+ clean_node : function (obj) {
940
943
  obj = obj && obj != -1 ? $(obj) : this.get_container_ul();
941
944
  obj = obj.is("li") ? obj.find("li").andSelf() : obj.find("li");
942
945
  obj.removeClass("jstree-last")
@@ -957,15 +960,15 @@
957
960
  this.__callback();
958
961
  },
959
962
  // Dummy functions to be overwritten by any datastore plugin included
960
- load_node : function (obj, s_call, e_call) {
963
+ load_node : function (obj, s_call, e_call) {
961
964
  this.__callback({ "obj" : obj });
962
965
  },
963
- _is_loaded : function (obj) {
966
+ _is_loaded : function (obj) {
964
967
  return true;
965
968
  },
966
969
 
967
970
  // Basic operations: create
968
- create_node : function (obj, position, js, callback, is_loaded) {
971
+ create_node : function (obj, position, js, callback, is_loaded) {
969
972
  obj = this._get_node(obj);
970
973
  position = typeof position === "undefined" ? "last" : position;
971
974
  var d = $("<li />"),
@@ -1028,6 +1031,9 @@
1028
1031
  }
1029
1032
  }
1030
1033
  tmp.prepend("<ins class='jstree-icon'>&#160;</ins>");
1034
+ if (!m.icon && js.icon) {
1035
+ m.icon = js.icon;
1036
+ }
1031
1037
  if (m.icon) {
1032
1038
  if (m.icon.indexOf("/") === -1) {
1033
1039
  tmp.children("ins").addClass(m.icon);
@@ -1049,8 +1055,14 @@
1049
1055
  }
1050
1056
  }
1051
1057
  switch (position) {
1052
- case "before": obj.before(d); tmp = this._get_parent(obj); break;
1053
- case "after" : obj.after(d); tmp = this._get_parent(obj); break;
1058
+ case "before":
1059
+ obj.before(d);
1060
+ tmp = this._get_parent(obj);
1061
+ break;
1062
+ case "after" :
1063
+ obj.after(d);
1064
+ tmp = this._get_parent(obj);
1065
+ break;
1054
1066
  case "inside":
1055
1067
  case "first" :
1056
1068
  if (!obj.children("ul").length) {
@@ -1094,7 +1106,7 @@
1094
1106
  return d;
1095
1107
  },
1096
1108
  // Basic operations: rename (deal with text)
1097
- get_text : function (obj) {
1109
+ get_text : function (obj) {
1098
1110
  obj = this._get_node(obj);
1099
1111
  if (!obj.length) {
1100
1112
  return false;
@@ -1113,7 +1125,7 @@
1113
1125
  return obj.nodeValue;
1114
1126
  }
1115
1127
  },
1116
- set_text : function (obj, val) {
1128
+ set_text : function (obj, val) {
1117
1129
  obj = this._get_node(obj);
1118
1130
  if (!obj.length) {
1119
1131
  return false;
@@ -1165,7 +1177,7 @@
1165
1177
  p.ot = $.jstree._reference(o) || this;
1166
1178
  p.o = p.ot._get_node(o);
1167
1179
  p.r = r === - 1 ? -1 : this._get_node(r);
1168
- p.p = (typeof pos === "undefined") ? "last" : pos; // TODO: move to a setting
1180
+ p.p = (typeof pos === "undefined" || pos === false) ? "last" : pos; // TODO: move to a setting
1169
1181
  if (!is_cb && prepared_move.o && prepared_move.o[0] === p.o[0] && prepared_move.r[0] === p.r[0] && prepared_move.p === p.p) {
1170
1182
  this.__callback(prepared_move);
1171
1183
  if (cb) {
@@ -1271,7 +1283,7 @@
1271
1283
  this.__rollback();
1272
1284
  var o = false;
1273
1285
  if (is_copy) {
1274
- o = obj.o.clone();
1286
+ o = obj.o.clone(true);
1275
1287
  o.find("*[id]").andSelf().each(function () {
1276
1288
  if (this.id) {
1277
1289
  this.id = "copy_" + this.id;
@@ -1316,7 +1328,7 @@
1316
1328
  })(jQuery);
1317
1329
 
1318
1330
 
1319
- /*
1331
+ /*
1320
1332
  * jsTree ui plugin
1321
1333
  * This plugins handles selecting/deselecting/hovering/dehovering nodes
1322
1334
  */
@@ -1442,7 +1454,7 @@
1442
1454
  this.data.ui.to_select = [];
1443
1455
  this.data.ui.selected.each(function () {
1444
1456
  if (this.id) {
1445
- _this.data.ui.to_select.push("#" + this.id.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\."));
1457
+ _this.data.ui.to_select.push("#" + this.id.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.").replace(/\:/g, "\\:"));
1446
1458
  }
1447
1459
  });
1448
1460
  this.__callback(this.data.ui.to_select);
@@ -1451,7 +1463,7 @@
1451
1463
  var _this = this,
1452
1464
  s = this.data.ui.to_select;
1453
1465
  s = $.map($.makeArray(s), function (n) {
1454
- return "#" + n.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.");
1466
+ return "#" + n.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.").replace(/\:/g, "\\:");
1455
1467
  });
1456
1468
  // this.deselect_all(); WHY deselect, breaks plugin state notifier?
1457
1469
  $.each(s, function (i, val) {
@@ -1629,7 +1641,7 @@
1629
1641
  })(jQuery);
1630
1642
 
1631
1643
 
1632
- /*
1644
+ /*
1633
1645
  * jsTree CRRM plugin
1634
1646
  * Handles creating/renaming/removing/moving nodes by user interaction.
1635
1647
  */
@@ -1649,10 +1661,10 @@
1649
1661
  defaults : {
1650
1662
  input_width_limit : 200,
1651
1663
  move : {
1652
- always_copy : false, // false, true or "multitree"
1653
- open_onmove : true,
1654
- default_position : "last",
1655
- check_move : function (m) {
1664
+ always_copy : false, // false, true or "multitree"
1665
+ open_onmove : true,
1666
+ default_position : "last",
1667
+ check_move : function (m) {
1656
1668
  return true;
1657
1669
  }
1658
1670
  }
@@ -1688,6 +1700,7 @@
1688
1700
  if (v === "") {
1689
1701
  v = t;
1690
1702
  }
1703
+ h1.remove();
1691
1704
  i.remove(); // rollback purposes
1692
1705
  this.set_text(obj, t); // rollback purposes
1693
1706
  this.rename_node(obj, v);
@@ -1716,17 +1729,17 @@
1716
1729
  }
1717
1730
  }
1718
1731
  })
1719
- ).children(".jstree-rename-input");
1732
+ ).children(".jstree-rename-input");
1720
1733
  this.set_text(obj, "");
1721
1734
  h1.css({
1722
- fontFamily : h2.css('fontFamily') || '',
1723
- fontSize : h2.css('fontSize') || '',
1724
- fontWeight : h2.css('fontWeight') || '',
1725
- fontStyle : h2.css('fontStyle') || '',
1726
- fontStretch : h2.css('fontStretch') || '',
1727
- fontVariant : h2.css('fontVariant') || '',
1728
- letterSpacing : h2.css('letterSpacing') || '',
1729
- wordSpacing : h2.css('wordSpacing') || ''
1735
+ fontFamily : h2.css('fontFamily') || '',
1736
+ fontSize : h2.css('fontSize') || '',
1737
+ fontWeight : h2.css('fontWeight') || '',
1738
+ fontStyle : h2.css('fontStyle') || '',
1739
+ fontStretch : h2.css('fontStretch') || '',
1740
+ fontVariant : h2.css('fontVariant') || '',
1741
+ letterSpacing : h2.css('letterSpacing') || '',
1742
+ wordSpacing : h2.css('wordSpacing') || ''
1730
1743
  });
1731
1744
  h2.width(Math.min(h1.text("pW" + h2[0].value).width(), w))[0].select();
1732
1745
  },
@@ -1845,8 +1858,7 @@
1845
1858
  })(jQuery);
1846
1859
 
1847
1860
 
1848
-
1849
- /*
1861
+ /*
1850
1862
  * jsTree themes plugin
1851
1863
  * Handles loading and setting themes, as well as detecting path to themes, etc.
1852
1864
  */
@@ -1916,19 +1928,19 @@
1916
1928
  }
1917
1929
  this.__callback();
1918
1930
  },
1919
- get_theme : function () {
1931
+ get_theme : function () {
1920
1932
  return this.data.themes.theme;
1921
1933
  },
1922
1934
 
1923
- show_dots : function () {
1935
+ show_dots : function () {
1924
1936
  this.data.themes.dots = true;
1925
1937
  this.get_container().children("ul").removeClass("jstree-no-dots");
1926
1938
  },
1927
- hide_dots : function () {
1939
+ hide_dots : function () {
1928
1940
  this.data.themes.dots = false;
1929
1941
  this.get_container().children("ul").addClass("jstree-no-dots");
1930
1942
  },
1931
- toggle_dots : function () {
1943
+ toggle_dots : function () {
1932
1944
  if (this.data.themes.dots) {
1933
1945
  this.hide_dots();
1934
1946
  } else {
@@ -1936,11 +1948,11 @@
1936
1948
  }
1937
1949
  },
1938
1950
 
1939
- show_icons : function () {
1951
+ show_icons : function () {
1940
1952
  this.data.themes.icons = true;
1941
1953
  this.get_container().children("ul").removeClass("jstree-no-icons");
1942
1954
  },
1943
- hide_icons : function () {
1955
+ hide_icons : function () {
1944
1956
  this.data.themes.icons = false;
1945
1957
  this.get_container().children("ul").addClass("jstree-no-icons");
1946
1958
  },
@@ -1955,15 +1967,17 @@
1955
1967
  });
1956
1968
  // autodetect themes path
1957
1969
  $(function () {
1958
- // if($.jstree._themes === false) {
1959
- // $("script").each(function () {
1960
- // if(this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)) {
1961
- // $.jstree._themes = this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/, "") + 'themes/';
1962
- // return false;
1963
- // }
1964
- // });
1965
- // }
1966
- // if($.jstree._themes === false) { $.jstree._themes = "themes/"; }
1970
+ /*if ($.jstree._themes === false) {
1971
+ $("script").each(function () {
1972
+ if (this.src.toString().match(/jquery\.jstree[^\/]*?\.js(\?.*)?$/)) {
1973
+ $.jstree._themes = this.src.toString().replace(/jquery\.jstree[^\/]*?\.js(\?.*)?$/, "") + 'themes/';
1974
+ return false;
1975
+ }
1976
+ });
1977
+ }
1978
+ if ($.jstree._themes === false) {
1979
+ $.jstree._themes = "themes/";
1980
+ }*/
1967
1981
  if ($.jstree._themes === false) {
1968
1982
  $.jstree._themes = "/stylesheets/compiled/jquery/jstree/";
1969
1983
  }
@@ -1971,9 +1985,6 @@
1971
1985
  // include the themes plugin by default
1972
1986
  $.jstree.defaults.plugins.push("themes");
1973
1987
  })(jQuery);
1974
- //*/
1975
-
1976
-
1977
1988
 
1978
1989
  /*
1979
1990
  * jsTree hotkeys plugin
@@ -2164,8 +2175,7 @@
2164
2175
  });
2165
2176
  })(jQuery);
2166
2177
 
2167
-
2168
- /*
2178
+ /*
2169
2179
  * jsTree JSON plugin
2170
2180
  * The JSON data store. Datastores are build by overriding the `load_node` and `_is_loaded` functions.
2171
2181
  */
@@ -2206,7 +2216,7 @@
2206
2216
  obj = this._get_node(obj);
2207
2217
  var s = this._get_settings().json_data;
2208
2218
  if (obj && obj !== -1 && s.progressive_unload && ($.isFunction(s.data) || !!s.ajax)) {
2209
- obj.removeData("jstree-children");
2219
+ obj.removeData("jstree_children");
2210
2220
  }
2211
2221
  return this.__call_old();
2212
2222
  },
@@ -2218,12 +2228,12 @@
2218
2228
  };
2219
2229
  obj = this._get_node(obj);
2220
2230
 
2221
- if (obj && obj !== -1 && (s.progressive_render || s.progressive_unload) && !obj.is(".jstree-open, .jstree-leaf") && obj.children("ul").children("li").length === 0 && obj.data("jstree-children")) {
2222
- d = this._parse_json(obj.data("jstree-children"), obj);
2231
+ if (obj && obj !== -1 && (s.progressive_render || s.progressive_unload) && !obj.is(".jstree-open, .jstree-leaf") && obj.children("ul").children("li").length === 0 && obj.data("jstree_children")) {
2232
+ d = this._parse_json(obj.data("jstree_children"), obj);
2223
2233
  if (d) {
2224
2234
  obj.append(d);
2225
2235
  if (!s.progressive_unload) {
2226
- obj.removeData("jstree-children");
2236
+ obj.removeData("jstree_children");
2227
2237
  }
2228
2238
  }
2229
2239
  this.clean_node(obj);
@@ -2234,15 +2244,16 @@
2234
2244
  }
2235
2245
 
2236
2246
  if (obj && obj !== -1) {
2237
- if (obj.data("jstree-is-loading")) {
2247
+ if (obj.data("jstree_is_loading")) {
2238
2248
  return;
2239
2249
  }
2240
2250
  else {
2241
- obj.data("jstree-is-loading", true);
2251
+ obj.data("jstree_is_loading", true);
2242
2252
  }
2243
2253
  }
2244
2254
  switch (!0) {
2245
- case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied.";
2255
+ case (!s.data && !s.ajax):
2256
+ throw "Neither data nor ajax settings supplied.";
2246
2257
  // function option added here for easier model integration (also supporting async - see callback)
2247
2258
  case ($.isFunction(s.data)):
2248
2259
  s.data.call(this, obj, $.proxy(function (d) {
@@ -2255,7 +2266,7 @@
2255
2266
  }
2256
2267
  else {
2257
2268
  obj.children("a.jstree-loading").removeClass("jstree-loading");
2258
- obj.removeData("jstree-is-loading");
2269
+ obj.removeData("jstree_is_loading");
2259
2270
  if (s.correct_state) {
2260
2271
  this.correct_state(obj);
2261
2272
  }
@@ -2270,7 +2281,7 @@
2270
2281
  }
2271
2282
  else {
2272
2283
  obj.append(d).children("a.jstree-loading").removeClass("jstree-loading");
2273
- obj.removeData("jstree-is-loading");
2284
+ obj.removeData("jstree_is_loading");
2274
2285
  }
2275
2286
  this.clean_node(obj);
2276
2287
  if (s_call) {
@@ -2304,7 +2315,7 @@
2304
2315
  }
2305
2316
  if (obj != -1 && obj.length) {
2306
2317
  obj.children("a.jstree-loading").removeClass("jstree-loading");
2307
- obj.removeData("jstree-is-loading");
2318
+ obj.removeData("jstree_is_loading");
2308
2319
  if (t === "success" && s.correct_state) {
2309
2320
  this.correct_state(obj);
2310
2321
  }
@@ -2333,7 +2344,7 @@
2333
2344
  }
2334
2345
  else {
2335
2346
  obj.append(d).children("a.jstree-loading").removeClass("jstree-loading");
2336
- obj.removeData("jstree-is-loading");
2347
+ obj.removeData("jstree_is_loading");
2337
2348
  }
2338
2349
  this.clean_node(obj);
2339
2350
  if (s_call) {
@@ -2351,7 +2362,7 @@
2351
2362
  }
2352
2363
  else {
2353
2364
  obj.children("a.jstree-loading").removeClass("jstree-loading");
2354
- obj.removeData("jstree-is-loading");
2365
+ obj.removeData("jstree_is_loading");
2355
2366
  if (s.correct_state) {
2356
2367
  this.correct_state(obj);
2357
2368
  if (s_call) {
@@ -2388,7 +2399,7 @@
2388
2399
  return d;
2389
2400
  }
2390
2401
  if (s.progressive_unload && obj && obj !== -1) {
2391
- obj.data("jstree-children", d);
2402
+ obj.data("jstree_children", d);
2392
2403
  }
2393
2404
  if ($.isArray(js)) {
2394
2405
  d = $();
@@ -2461,11 +2472,11 @@
2461
2472
  d.prepend("<ins class='jstree-icon'>&#160;</ins>");
2462
2473
  if (js.children) {
2463
2474
  if (s.progressive_render && js.state !== "open") {
2464
- d.addClass("jstree-closed").data("jstree-children", js.children);
2475
+ d.addClass("jstree-closed").data("jstree_children", js.children);
2465
2476
  }
2466
2477
  else {
2467
2478
  if (s.progressive_unload) {
2468
- d.data("jstree-children", js.children);
2479
+ d.data("jstree_children", js.children);
2469
2480
  }
2470
2481
  if ($.isArray(js.children) && js.children.length) {
2471
2482
  tmp = this._parse_json(js.children, obj, true);
@@ -2581,7 +2592,7 @@
2581
2592
  })(jQuery);
2582
2593
 
2583
2594
 
2584
- /*
2595
+ /*
2585
2596
  * jsTree languages plugin
2586
2597
  * Adds support for multiple language versions in one tree
2587
2598
  * This basically allows for many titles coexisting in one node, but only one of them being visible at any given time
@@ -2737,7 +2748,6 @@
2737
2748
  })(jQuery);
2738
2749
 
2739
2750
 
2740
-
2741
2751
  /*
2742
2752
  * jsTree cookies plugin
2743
2753
  * Stores the currently opened/selected nodes in a cookie and then restores them
@@ -2781,11 +2791,11 @@
2781
2791
  }, this));
2782
2792
  },
2783
2793
  defaults : {
2784
- save_loaded : "jstree_load",
2785
- save_opened : "jstree_open",
2786
- save_selected : "jstree_select",
2787
- auto_save : true,
2788
- cookie_options : {}
2794
+ save_loaded : "jstree_load",
2795
+ save_opened : "jstree_open",
2796
+ save_selected : "jstree_select",
2797
+ auto_save : true,
2798
+ cookie_options : {}
2789
2799
  },
2790
2800
  _fn : {
2791
2801
  save_cookie : function (c) {
@@ -2836,7 +2846,6 @@
2836
2846
  })(jQuery);
2837
2847
 
2838
2848
 
2839
-
2840
2849
  /*
2841
2850
  * jsTree sort plugin
2842
2851
  * Sorts items alphabetically (or using any other function)
@@ -2876,7 +2885,6 @@
2876
2885
  })(jQuery);
2877
2886
 
2878
2887
 
2879
-
2880
2888
  /*
2881
2889
  * jsTree DND plugin
2882
2890
  * Drag and drop plugin for moving/copying nodes
@@ -3346,17 +3354,17 @@
3346
3354
  }
3347
3355
  },
3348
3356
  defaults : {
3349
- copy_modifier : "ctrl",
3350
- check_timeout : 100,
3351
- open_timeout : 500,
3352
- drop_target : ".jstree-drop",
3353
- drop_check : function (data) {
3357
+ copy_modifier : "ctrl",
3358
+ check_timeout : 100,
3359
+ open_timeout : 500,
3360
+ drop_target : ".jstree-drop",
3361
+ drop_check : function (data) {
3354
3362
  return true;
3355
3363
  },
3356
- drop_finish : $.noop,
3357
- drag_target : ".jstree-draggable",
3358
- drag_finish : $.noop,
3359
- drag_check : function (data) {
3364
+ drop_finish : $.noop,
3365
+ drag_target : ".jstree-draggable",
3366
+ drag_finish : $.noop,
3367
+ drag_check : function (data) {
3360
3368
  return { after : false, before : false, inside : true };
3361
3369
  }
3362
3370
  },
@@ -3566,35 +3574,35 @@
3566
3574
  $.vakata.css.add_sheet({ str : css_string, title : "jstree" });
3567
3575
  m = $("<div />").attr({ id : "jstree-marker" }).hide().html("&raquo;")
3568
3576
  .bind("mouseleave mouseenter", function (e) {
3569
- m.hide();
3570
- ml.hide();
3571
- e.preventDefault();
3572
- e.stopImmediatePropagation();
3573
- return false;
3574
- })
3577
+ m.hide();
3578
+ ml.hide();
3579
+ e.preventDefault();
3580
+ e.stopImmediatePropagation();
3581
+ return false;
3582
+ })
3575
3583
  .appendTo("body");
3576
3584
  ml = $("<div />").attr({ id : "jstree-marker-line" }).hide()
3577
3585
  .bind("mouseup", function (e) {
3578
- if (r && r.length) {
3579
- r.children("a").trigger(e);
3580
- e.preventDefault();
3581
- e.stopImmediatePropagation();
3582
- return false;
3583
- }
3584
- })
3586
+ if (r && r.length) {
3587
+ r.children("a").trigger(e);
3588
+ e.preventDefault();
3589
+ e.stopImmediatePropagation();
3590
+ return false;
3591
+ }
3592
+ })
3585
3593
  .bind("mouseleave", function (e) {
3586
- var rt = $(e.relatedTarget);
3587
- if (rt.is(".jstree") || rt.closest(".jstree").length === 0) {
3588
- if (r && r.length) {
3589
- r.children("a").trigger(e);
3590
- m.hide();
3591
- ml.hide();
3592
- e.preventDefault();
3593
- e.stopImmediatePropagation();
3594
- return false;
3595
- }
3596
- }
3597
- })
3594
+ var rt = $(e.relatedTarget);
3595
+ if (rt.is(".jstree") || rt.closest(".jstree").length === 0) {
3596
+ if (r && r.length) {
3597
+ r.children("a").trigger(e);
3598
+ m.hide();
3599
+ ml.hide();
3600
+ e.preventDefault();
3601
+ e.stopImmediatePropagation();
3602
+ return false;
3603
+ }
3604
+ }
3605
+ })
3598
3606
  .appendTo("body");
3599
3607
  $(document).bind("drag_start.vakata", function (e, data) {
3600
3608
  if (data.data.jstree) {
@@ -3616,7 +3624,6 @@
3616
3624
  })(jQuery);
3617
3625
 
3618
3626
 
3619
-
3620
3627
  /*
3621
3628
  * jsTree checkbox plugin
3622
3629
  * Inserts checkboxes in front of every node
@@ -3699,29 +3706,20 @@
3699
3706
  else {
3700
3707
  $t.children(":checkbox").addClass("jstree-real-checkbox");
3701
3708
  }
3702
- if (c === "jstree-checked") {
3703
- $t.children(":checkbox").attr("checked", "checked");
3709
+ }
3710
+ if (!ts) {
3711
+ if (c === "jstree-checked" || $t.hasClass("jstree-checked") || $t.children(':checked').length) {
3712
+ $t.find("li").andSelf().addClass("jstree-checked").children(":checkbox").prop("checked", true);
3704
3713
  }
3705
3714
  }
3706
- if (c === "jstree-checked" && !ts) {
3707
- $t.find("li").addClass("jstree-checked");
3715
+ else {
3716
+ if ($t.hasClass("jstree-checked") || $t.children(':checked').length) {
3717
+ $t.addClass("jstree-checked").children(":checkbox").prop("checked", true);
3718
+ }
3708
3719
  }
3709
3720
  });
3710
3721
  });
3711
3722
  if (!ts) {
3712
- if (obj.length === 1 && obj.is("li")) {
3713
- this._repair_state(obj);
3714
- }
3715
- if (obj.is("li")) {
3716
- obj.each(function () {
3717
- _this._repair_state(this);
3718
- });
3719
- }
3720
- else {
3721
- obj.find("> ul > li").each(function () {
3722
- _this._repair_state(this);
3723
- });
3724
- }
3725
3723
  obj.find(".jstree-checked").parent().parent().each(function () {
3726
3724
  _this._repair_state(this);
3727
3725
  });
@@ -3738,13 +3736,13 @@
3738
3736
  if (state) {
3739
3737
  obj.removeClass("jstree-checked").addClass("jstree-unchecked");
3740
3738
  if (rc) {
3741
- obj.children(":checkbox").removeAttr("checked");
3739
+ obj.children(":checkbox").prop("checked", false);
3742
3740
  }
3743
3741
  }
3744
3742
  else {
3745
3743
  obj.removeClass("jstree-unchecked").addClass("jstree-checked");
3746
3744
  if (rc) {
3747
- obj.children(":checkbox").attr("checked", "checked");
3745
+ obj.children(":checkbox").prop("checked", true);
3748
3746
  }
3749
3747
  }
3750
3748
  }
@@ -3756,7 +3754,7 @@
3756
3754
  }
3757
3755
  coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
3758
3756
  if (rc) {
3759
- coll.children(":checkbox").removeAttr("checked");
3757
+ coll.children(":checkbox").prop("checked", false);
3760
3758
  }
3761
3759
  }
3762
3760
  else {
@@ -3766,7 +3764,7 @@
3766
3764
  }
3767
3765
  coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
3768
3766
  if (rc) {
3769
- coll.children(":checkbox").attr("checked", "checked");
3767
+ coll.children(":checkbox").prop("checked", true);
3770
3768
  }
3771
3769
  if (this.data.ui) {
3772
3770
  this.data.ui.last_selected = obj;
@@ -3779,14 +3777,14 @@
3779
3777
  if ($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length) {
3780
3778
  $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
3781
3779
  if (rc) {
3782
- $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").removeAttr("checked");
3780
+ $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false);
3783
3781
  }
3784
3782
  return false;
3785
3783
  }
3786
3784
  else {
3787
3785
  $this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
3788
3786
  if (rc) {
3789
- $this.children(":checkbox").removeAttr("checked");
3787
+ $this.children(":checkbox").prop("checked", false);
3790
3788
  }
3791
3789
  }
3792
3790
  }
@@ -3794,14 +3792,14 @@
3794
3792
  if ($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length) {
3795
3793
  $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
3796
3794
  if (rc) {
3797
- $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").removeAttr("checked");
3795
+ $this.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false);
3798
3796
  }
3799
3797
  return false;
3800
3798
  }
3801
3799
  else {
3802
3800
  $this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
3803
3801
  if (rc) {
3804
- $this.children(":checkbox").attr("checked", "checked");
3802
+ $this.children(":checkbox").prop("checked", true);
3805
3803
  }
3806
3804
  }
3807
3805
  }
@@ -3872,6 +3870,10 @@
3872
3870
  if (!obj.length) {
3873
3871
  return;
3874
3872
  }
3873
+ if (this._get_settings().checkbox.two_state) {
3874
+ obj.find('li').andSelf().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children(':checkbox').prop('checked', true);
3875
+ return;
3876
+ }
3875
3877
  var rc = this._get_settings().checkbox.real_checkboxes,
3876
3878
  a = obj.find("> ul > .jstree-checked").length,
3877
3879
  b = obj.find("> ul > .jstree-undetermined").length,
@@ -3890,7 +3892,7 @@
3890
3892
  else {
3891
3893
  obj.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
3892
3894
  if (rc) {
3893
- obj.parentsUntil(".jstree", "li").andSelf().children(":checkbox").removeAttr("checked");
3895
+ obj.parentsUntil(".jstree", "li").andSelf().children(":checkbox").prop("checked", false);
3894
3896
  }
3895
3897
  }
3896
3898
  },
@@ -3899,7 +3901,7 @@
3899
3901
  var _this = this,
3900
3902
  s = this.data.ui.to_select;
3901
3903
  s = $.map($.makeArray(s), function (n) {
3902
- return "#" + n.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.");
3904
+ return "#" + n.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.").replace(/\:/g, "\\:");
3903
3905
  });
3904
3906
  this.deselect_all();
3905
3907
  $.each(s, function (i, val) {
@@ -3929,8 +3931,7 @@
3929
3931
  })(jQuery);
3930
3932
 
3931
3933
 
3932
-
3933
- /*
3934
+ /*
3934
3935
  * jsTree XML plugin
3935
3936
  * The XML data store. Datastores are build by overriding the `load_node` and `_is_loaded` functions.
3936
3937
  */
@@ -4120,7 +4121,16 @@
4120
4121
  ' </li>' +
4121
4122
  '</xsl:template>' +
4122
4123
  '</xsl:stylesheet>'
4123
- };
4124
+ },
4125
+ escape_xml = function(string) {
4126
+ return string
4127
+ .toString()
4128
+ .replace(/&/g, '&amp;')
4129
+ .replace(/</g, '&lt;')
4130
+ .replace(/>/g, '&gt;')
4131
+ .replace(/"/g, '&quot;')
4132
+ .replace(/'/g, '&apos;');
4133
+ };
4124
4134
  $.jstree.plugin("xml_data", {
4125
4135
  defaults : {
4126
4136
  data : false,
@@ -4128,7 +4138,8 @@
4128
4138
  xsl : "flat",
4129
4139
  clean_node : false,
4130
4140
  correct_state : true,
4131
- get_skip_empty : false
4141
+ get_skip_empty : false,
4142
+ get_include_preamble : true
4132
4143
  },
4133
4144
  _fn : {
4134
4145
  load_node : function (obj, s_call, e_call) {
@@ -4152,15 +4163,16 @@
4152
4163
 
4153
4164
  obj = this._get_node(obj);
4154
4165
  if (obj && obj !== -1) {
4155
- if (obj.data("jstree-is-loading")) {
4166
+ if (obj.data("jstree_is_loading")) {
4156
4167
  return;
4157
4168
  }
4158
4169
  else {
4159
- obj.data("jstree-is-loading", true);
4170
+ obj.data("jstree_is_loading", true);
4160
4171
  }
4161
4172
  }
4162
4173
  switch (!0) {
4163
- case (!s.data && !s.ajax): throw "Neither data nor ajax settings supplied.";
4174
+ case (!s.data && !s.ajax):
4175
+ throw "Neither data nor ajax settings supplied.";
4164
4176
  case ($.isFunction(s.data)):
4165
4177
  s.data.call(this, obj, $.proxy(function (d) {
4166
4178
  this.parse_xml(d, $.proxy(function (d) {
@@ -4174,7 +4186,7 @@
4174
4186
  else {
4175
4187
  obj.children("a.jstree-loading").removeClass("jstree-loading");
4176
4188
  obj.append(d);
4177
- obj.removeData("jstree-is-loading");
4189
+ obj.removeData("jstree_is_loading");
4178
4190
  }
4179
4191
  if (s.clean_node) {
4180
4192
  this.clean_node(obj);
@@ -4186,7 +4198,7 @@
4186
4198
  else {
4187
4199
  if (obj && obj !== -1) {
4188
4200
  obj.children("a.jstree-loading").removeClass("jstree-loading");
4189
- obj.removeData("jstree-is-loading");
4201
+ obj.removeData("jstree_is_loading");
4190
4202
  if (s.correct_state) {
4191
4203
  this.correct_state(obj);
4192
4204
  if (s_call) {
@@ -4242,7 +4254,7 @@
4242
4254
  }
4243
4255
  if (obj !== -1 && obj.length) {
4244
4256
  obj.children("a.jstree-loading").removeClass("jstree-loading");
4245
- obj.removeData("jstree-is-loading");
4257
+ obj.removeData("jstree_is_loading");
4246
4258
  if (t === "success" && s.correct_state) {
4247
4259
  this.correct_state(obj);
4248
4260
  }
@@ -4276,7 +4288,7 @@
4276
4288
  else {
4277
4289
  obj.children("a.jstree-loading").removeClass("jstree-loading");
4278
4290
  obj.append(d);
4279
- obj.removeData("jstree-is-loading");
4291
+ obj.removeData("jstree_is_loading");
4280
4292
  }
4281
4293
  if (s.clean_node) {
4282
4294
  this.clean_node(obj);
@@ -4288,7 +4300,7 @@
4288
4300
  else {
4289
4301
  if (obj && obj !== -1) {
4290
4302
  obj.children("a.jstree-loading").removeClass("jstree-loading");
4291
- obj.removeData("jstree-is-loading");
4303
+ obj.removeData("jstree_is_loading");
4292
4304
  if (s.correct_state) {
4293
4305
  this.correct_state(obj);
4294
4306
  if (s_call) {
@@ -4351,6 +4363,9 @@
4351
4363
  a_attr = $.isArray(a_attr) ? a_attr : [ ];
4352
4364
 
4353
4365
  if (!is_callback) {
4366
+ if (s.xml_data.get_include_preamble) {
4367
+ result += '<' + '?xml version="1.0" encoding="UTF-8"?' + '>';
4368
+ }
4354
4369
  result += "<root>";
4355
4370
  }
4356
4371
  obj.each(function () {
@@ -4359,7 +4374,7 @@
4359
4374
  $.each(li_attr, function (i, v) {
4360
4375
  var t = li.attr(v);
4361
4376
  if (!s.xml_data.get_skip_empty || typeof t !== "undefined") {
4362
- result += " " + v + "=\"" + (" " + (t || "")).replace(/ jstree[^ ]*/ig, '').replace(/\s+$/ig, " ").replace(/^ /, "").replace(/ $/, "") + "\"";
4377
+ result += " " + v + "=\"" + escape_xml((" " + (t || "")).replace(/ jstree[^ ]*/ig, '').replace(/\s+$/ig, " ").replace(/^ /, "").replace(/ $/, "")) + "\"";
4363
4378
  }
4364
4379
  });
4365
4380
  if (li.hasClass("jstree-open")) {
@@ -4369,7 +4384,7 @@
4369
4384
  result += " state=\"closed\"";
4370
4385
  }
4371
4386
  if (tp === "flat") {
4372
- result += " parent_id=\"" + is_callback + "\"";
4387
+ result += " parent_id=\"" + escape_xml(is_callback) + "\"";
4373
4388
  }
4374
4389
  result += ">";
4375
4390
  result += "<content>";
@@ -4381,7 +4396,7 @@
4381
4396
  if ($.inArray("languages", s.plugins) !== -1) {
4382
4397
  $.each(s.languages, function (k, z) {
4383
4398
  if (tmp1.hasClass(z)) {
4384
- result += " lang=\"" + z + "\"";
4399
+ result += " lang=\"" + escape_xml(z) + "\"";
4385
4400
  lang = z;
4386
4401
  return false;
4387
4402
  }
@@ -4391,15 +4406,15 @@
4391
4406
  $.each(a_attr, function (k, z) {
4392
4407
  var t = tmp1.attr(z);
4393
4408
  if (!s.xml_data.get_skip_empty || typeof t !== "undefined") {
4394
- result += " " + z + "=\"" + (" " + t || "").replace(/ jstree[^ ]*/ig, '').replace(/\s+$/ig, " ").replace(/^ /, "").replace(/ $/, "") + "\"";
4409
+ result += " " + z + "=\"" + escape_xml((" " + t || "").replace(/ jstree[^ ]*/ig, '').replace(/\s+$/ig, " ").replace(/^ /, "").replace(/ $/, "")) + "\"";
4395
4410
  }
4396
4411
  });
4397
4412
  }
4398
4413
  if (tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig, '').replace(/^\s+$/ig, "").length) {
4399
- result += ' icon="' + tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig, '').replace(/\s+$/ig, " ").replace(/^ /, "").replace(/ $/, "") + '"';
4414
+ result += ' icon="' + escape_xml(tmp1.children("ins").get(0).className.replace(/jstree[^ ]*|$/ig, '').replace(/\s+$/ig, " ").replace(/^ /, "").replace(/ $/, "")) + '"';
4400
4415
  }
4401
4416
  if (tmp1.children("ins").get(0).style.backgroundImage.length) {
4402
- result += ' icon="' + tmp1.children("ins").get(0).style.backgroundImage.replace("url(", "").replace(")", "").replace(/'/ig, "").replace(/"/ig, "") + '"';
4417
+ result += ' icon="' + escape_xml(tmp1.children("ins").get(0).style.backgroundImage.replace("url(", "").replace(")", "").replace(/'/ig, "").replace(/"/ig, "")) + '"';
4403
4418
  }
4404
4419
  result += ">";
4405
4420
  result += "<![CDATA[" + _this.get_text(tmp1, lang) + "]]>";
@@ -4451,15 +4466,15 @@
4451
4466
  if (this._get_settings().search.show_only_matches) {
4452
4467
  this.get_container()
4453
4468
  .bind("search.jstree", function (e, data) {
4454
- $(this).children("ul").find("li").hide().removeClass("jstree-last");
4455
- data.rslt.nodes.parentsUntil(".jstree").andSelf().show()
4456
- .filter("ul").each(function () {
4457
- $(this).children("li:visible").eq(-1).addClass("jstree-last");
4458
- });
4459
- })
4469
+ $(this).children("ul").find("li").hide().removeClass("jstree-last");
4470
+ data.rslt.nodes.parentsUntil(".jstree").andSelf().show()
4471
+ .filter("ul").each(function () {
4472
+ $(this).children("li:visible").eq(-1).addClass("jstree-last");
4473
+ });
4474
+ })
4460
4475
  .bind("clear_search.jstree", function () {
4461
- $(this).children("ul").find("li").css("display", "").end().jstree("clean_node", -1);
4462
- });
4476
+ $(this).children("ul").find("li").css("display", "").end().end().jstree("clean_node", -1);
4477
+ });
4463
4478
  }
4464
4479
  },
4465
4480
  defaults : {
@@ -4561,22 +4576,21 @@
4561
4576
  })(jQuery);
4562
4577
 
4563
4578
 
4564
-
4565
- /*
4579
+ /*
4566
4580
  * jsTree contextmenu plugin
4567
4581
  */
4568
4582
  (function ($) {
4569
4583
  $.vakata.context = {
4570
4584
  hide_on_mouseleave : false,
4571
4585
 
4572
- cnt : $("<div id='vakata-contextmenu' />"),
4573
- vis : false,
4574
- tgt : false,
4575
- par : false,
4576
- func : false,
4577
- data : false,
4578
- rtl : false,
4579
- show : function (s, t, x, y, d, p, rtl) {
4586
+ cnt : $("<div id='vakata-contextmenu' />"),
4587
+ vis : false,
4588
+ tgt : false,
4589
+ par : false,
4590
+ func : false,
4591
+ data : false,
4592
+ rtl : false,
4593
+ show : function (s, t, x, y, d, p, rtl) {
4580
4594
  $.vakata.context.rtl = !!rtl;
4581
4595
  var html = $.vakata.context.parse(s), h, w;
4582
4596
  if (!html) {
@@ -4612,30 +4626,30 @@
4612
4626
  .css({ "left" : x, "top" : y })
4613
4627
  .find("li:has(ul)")
4614
4628
  .bind("mouseenter", function (e) {
4615
- var w = $(document).width(),
4616
- h = $(document).height(),
4617
- ul = $(this).children("ul").show();
4618
- if (w !== $(document).width()) {
4619
- ul.toggleClass("right");
4620
- }
4621
- if (h !== $(document).height()) {
4622
- ul.toggleClass("bottom");
4623
- }
4624
- })
4629
+ var w = $(document).width(),
4630
+ h = $(document).height(),
4631
+ ul = $(this).children("ul").show();
4632
+ if (w !== $(document).width()) {
4633
+ ul.toggleClass("right");
4634
+ }
4635
+ if (h !== $(document).height()) {
4636
+ ul.toggleClass("bottom");
4637
+ }
4638
+ })
4625
4639
  .bind("mouseleave", function (e) {
4626
- $(this).children("ul").hide();
4627
- })
4640
+ $(this).children("ul").hide();
4641
+ })
4628
4642
  .end()
4629
4643
  .css({ "visibility" : "visible" })
4630
4644
  .show();
4631
4645
  $(document).triggerHandler("context_show.vakata");
4632
4646
  },
4633
- hide : function () {
4647
+ hide : function () {
4634
4648
  $.vakata.context.vis = false;
4635
4649
  $.vakata.context.cnt.attr("class", "").css({ "visibility" : "hidden" });
4636
4650
  $(document).triggerHandler("context_hide.vakata");
4637
4651
  },
4638
- parse : function (s, is_callback) {
4652
+ parse : function (s, is_callback) {
4639
4653
  if (!s) {
4640
4654
  return false;
4641
4655
  }
@@ -4684,8 +4698,9 @@
4684
4698
  $(document).triggerHandler("context_parse.vakata");
4685
4699
  return str.length > 10 ? str : false;
4686
4700
  },
4687
- exec : function (i) {
4701
+ exec : function (i) {
4688
4702
  if ($.isFunction($.vakata.context.func[i])) {
4703
+ // if is string - eval and call it!
4689
4704
  $.vakata.context.func[i].call($.vakata.context.data, $.vakata.context.par);
4690
4705
  return true;
4691
4706
  }
@@ -4713,16 +4728,16 @@
4713
4728
  e.preventDefault();
4714
4729
  })
4715
4730
  .delegate("a", "mouseup", function (e) {
4716
- if (!$(this).parent().hasClass("jstree-contextmenu-disabled") && $.vakata.context.exec($(this).attr("rel"))) {
4717
- $.vakata.context.hide();
4718
- }
4719
- else {
4720
- $(this).blur();
4721
- }
4722
- })
4731
+ if (!$(this).parent().hasClass("jstree-contextmenu-disabled") && $.vakata.context.exec($(this).attr("rel"))) {
4732
+ $.vakata.context.hide();
4733
+ }
4734
+ else {
4735
+ $(this).blur();
4736
+ }
4737
+ })
4723
4738
  .delegate("a", "mouseover", function () {
4724
- $.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover");
4725
- })
4739
+ $.vakata.context.cnt.find(".vakata-hover").removeClass("vakata-hover");
4740
+ })
4726
4741
  .appendTo("body");
4727
4742
  $(document).bind("mousedown", function (e) {
4728
4743
  if ($.vakata.context.vis && !$.contains($.vakata.context.cnt[0], e.target)) {
@@ -4732,49 +4747,49 @@
4732
4747
  if (typeof $.hotkeys !== "undefined") {
4733
4748
  $(document)
4734
4749
  .bind("keydown", "up", function (e) {
4735
- if ($.vakata.context.vis) {
4736
- var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();
4737
- if (!o.length) {
4738
- o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last();
4739
- }
4740
- o.addClass("vakata-hover");
4741
- e.stopImmediatePropagation();
4742
- e.preventDefault();
4743
- }
4744
- })
4750
+ if ($.vakata.context.vis) {
4751
+ var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").prevAll("li:not(.vakata-separator)").first();
4752
+ if (!o.length) {
4753
+ o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").last();
4754
+ }
4755
+ o.addClass("vakata-hover");
4756
+ e.stopImmediatePropagation();
4757
+ e.preventDefault();
4758
+ }
4759
+ })
4745
4760
  .bind("keydown", "down", function (e) {
4746
- if ($.vakata.context.vis) {
4747
- var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();
4748
- if (!o.length) {
4749
- o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first();
4750
- }
4751
- o.addClass("vakata-hover");
4752
- e.stopImmediatePropagation();
4753
- e.preventDefault();
4754
- }
4755
- })
4761
+ if ($.vakata.context.vis) {
4762
+ var o = $.vakata.context.cnt.find("ul:visible").last().children(".vakata-hover").removeClass("vakata-hover").nextAll("li:not(.vakata-separator)").first();
4763
+ if (!o.length) {
4764
+ o = $.vakata.context.cnt.find("ul:visible").last().children("li:not(.vakata-separator)").first();
4765
+ }
4766
+ o.addClass("vakata-hover");
4767
+ e.stopImmediatePropagation();
4768
+ e.preventDefault();
4769
+ }
4770
+ })
4756
4771
  .bind("keydown", "right", function (e) {
4757
- if ($.vakata.context.vis) {
4758
- $.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover");
4759
- e.stopImmediatePropagation();
4760
- e.preventDefault();
4761
- }
4762
- })
4772
+ if ($.vakata.context.vis) {
4773
+ $.vakata.context.cnt.find(".vakata-hover").children("ul").show().children("li:not(.vakata-separator)").removeClass("vakata-hover").first().addClass("vakata-hover");
4774
+ e.stopImmediatePropagation();
4775
+ e.preventDefault();
4776
+ }
4777
+ })
4763
4778
  .bind("keydown", "left", function (e) {
4764
- if ($.vakata.context.vis) {
4765
- $.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover");
4766
- e.stopImmediatePropagation();
4767
- e.preventDefault();
4768
- }
4769
- })
4779
+ if ($.vakata.context.vis) {
4780
+ $.vakata.context.cnt.find(".vakata-hover").children("ul").hide().children(".vakata-separator").removeClass("vakata-hover");
4781
+ e.stopImmediatePropagation();
4782
+ e.preventDefault();
4783
+ }
4784
+ })
4770
4785
  .bind("keydown", "esc", function (e) {
4771
- $.vakata.context.hide();
4772
- e.preventDefault();
4773
- })
4786
+ $.vakata.context.hide();
4787
+ e.preventDefault();
4788
+ })
4774
4789
  .bind("keydown", "space", function (e) {
4775
- $.vakata.context.cnt.find(".vakata-hover").last().children("a").click();
4776
- e.preventDefault();
4777
- });
4790
+ $.vakata.context.cnt.find(".vakata-hover").last().children("a").click();
4791
+ e.preventDefault();
4792
+ });
4778
4793
  }
4779
4794
  });
4780
4795
 
@@ -4807,27 +4822,27 @@
4807
4822
  show_at_node : true,
4808
4823
  items : { // Could be a function that should return an object like this one
4809
4824
  "create" : {
4810
- "separator_before" : false,
4811
- "separator_after" : true,
4812
- "label" : "Create",
4813
- "action" : function (obj) {
4825
+ "separator_before" : false,
4826
+ "separator_after" : true,
4827
+ "label" : "Create",
4828
+ "action" : function (obj) {
4814
4829
  this.create(obj);
4815
4830
  }
4816
4831
  },
4817
4832
  "rename" : {
4818
- "separator_before" : false,
4819
- "separator_after" : false,
4820
- "label" : "Rename",
4821
- "action" : function (obj) {
4833
+ "separator_before" : false,
4834
+ "separator_after" : false,
4835
+ "label" : "Rename",
4836
+ "action" : function (obj) {
4822
4837
  this.rename(obj);
4823
4838
  }
4824
4839
  },
4825
4840
  "remove" : {
4826
- "separator_before" : false,
4827
- "icon" : false,
4828
- "separator_after" : false,
4829
- "label" : "Delete",
4830
- "action" : function (obj) {
4841
+ "separator_before" : false,
4842
+ "icon" : false,
4843
+ "separator_after" : false,
4844
+ "label" : "Delete",
4845
+ "action" : function (obj) {
4831
4846
  if (this.is_selected(obj)) {
4832
4847
  this.remove();
4833
4848
  } else {
@@ -4836,35 +4851,35 @@
4836
4851
  }
4837
4852
  },
4838
4853
  "ccp" : {
4839
- "separator_before" : true,
4840
- "icon" : false,
4841
- "separator_after" : false,
4842
- "label" : "Edit",
4843
- "action" : false,
4854
+ "separator_before" : true,
4855
+ "icon" : false,
4856
+ "separator_after" : false,
4857
+ "label" : "Edit",
4858
+ "action" : false,
4844
4859
  "submenu" : {
4845
4860
  "cut" : {
4846
- "separator_before" : false,
4847
- "separator_after" : false,
4848
- "label" : "Cut",
4849
- "action" : function (obj) {
4861
+ "separator_before" : false,
4862
+ "separator_after" : false,
4863
+ "label" : "Cut",
4864
+ "action" : function (obj) {
4850
4865
  this.cut(obj);
4851
4866
  }
4852
4867
  },
4853
4868
  "copy" : {
4854
- "separator_before" : false,
4855
- "icon" : false,
4856
- "separator_after" : false,
4857
- "label" : "Copy",
4858
- "action" : function (obj) {
4869
+ "separator_before" : false,
4870
+ "icon" : false,
4871
+ "separator_after" : false,
4872
+ "label" : "Copy",
4873
+ "action" : function (obj) {
4859
4874
  this.copy(obj);
4860
4875
  }
4861
4876
  },
4862
4877
  "paste" : {
4863
- "separator_before" : false,
4864
- "icon" : false,
4865
- "separator_after" : false,
4866
- "label" : "Paste",
4867
- "action" : function (obj) {
4878
+ "separator_before" : false,
4879
+ "icon" : false,
4880
+ "separator_after" : false,
4881
+ "label" : "Paste",
4882
+ "action" : function (obj) {
4868
4883
  this.paste(obj);
4869
4884
  }
4870
4885
  }
@@ -4903,8 +4918,7 @@
4903
4918
  })(jQuery);
4904
4919
 
4905
4920
 
4906
-
4907
- /*
4921
+ /*
4908
4922
  * jsTree types plugin
4909
4923
  * Adds support types of nodes
4910
4924
  * You can set an attribute on each li node, that represents its type.
@@ -4999,11 +5013,11 @@
4999
5013
  },
5000
5014
  defaults : {
5001
5015
  // defines maximum number of root nodes (-1 means unlimited, -2 means disable max_children checking)
5002
- max_children : -1,
5016
+ max_children : -1,
5003
5017
  // defines the maximum depth of the tree (-1 means unlimited, -2 means disable max_depth checking)
5004
- max_depth : -1,
5018
+ max_depth : -1,
5005
5019
  // defines valid node types for the root nodes
5006
- valid_children : "all",
5020
+ valid_children : "all",
5007
5021
 
5008
5022
  // whether to use $.data
5009
5023
  use_data : false,
@@ -5013,8 +5027,8 @@
5013
5027
  types : {
5014
5028
  // the default type
5015
5029
  "default" : {
5016
- "max_children" : -1,
5017
- "max_depth" : -1,
5030
+ "max_children" : -1,
5031
+ "max_depth" : -1,
5018
5032
  "valid_children": "all"
5019
5033
 
5020
5034
  // Bound functions - you can bind any other function here (using boolean or function)
@@ -5177,7 +5191,7 @@
5177
5191
  }
5178
5192
  }
5179
5193
  if (s.max_children !== -2 && mc !== -1) {
5180
- ch = p === -1 ? this.get_container().children("> ul > li").length : p.children("> ul > li").length;
5194
+ ch = p === -1 ? this.get_container().find("> ul > li").length : p.find("> ul > li").length;
5181
5195
  if (ch + 1 > mc) {
5182
5196
  return false;
5183
5197
  }
@@ -5193,7 +5207,7 @@
5193
5207
  })(jQuery);
5194
5208
 
5195
5209
 
5196
- /*
5210
+ /*
5197
5211
  * jsTree HTML plugin
5198
5212
  * The HTML data store. Datastores are build by replacing the `load_node` and `_is_loaded` functions.
5199
5213
  */
@@ -5234,11 +5248,11 @@
5234
5248
  };
5235
5249
  obj = this._get_node(obj);
5236
5250
  if (obj && obj !== -1) {
5237
- if (obj.data("jstree-is-loading")) {
5251
+ if (obj.data("jstree_is_loading")) {
5238
5252
  return;
5239
5253
  }
5240
5254
  else {
5241
- obj.data("jstree-is-loading", true);
5255
+ obj.data("jstree_is_loading", true);
5242
5256
  }
5243
5257
  }
5244
5258
  switch (!0) {
@@ -5261,7 +5275,7 @@
5261
5275
  function () {
5262
5276
  return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS";
5263
5277
  }).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");
5264
- obj.removeData("jstree-is-loading");
5278
+ obj.removeData("jstree_is_loading");
5265
5279
  }
5266
5280
  this.clean_node(obj);
5267
5281
  if (s_call) {
@@ -5271,7 +5285,7 @@
5271
5285
  else {
5272
5286
  if (obj && obj !== -1) {
5273
5287
  obj.children("a.jstree-loading").removeClass("jstree-loading");
5274
- obj.removeData("jstree-is-loading");
5288
+ obj.removeData("jstree_is_loading");
5275
5289
  if (s.correct_state) {
5276
5290
  this.correct_state(obj);
5277
5291
  if (s_call) {
@@ -5334,7 +5348,7 @@
5334
5348
  }
5335
5349
  if (obj != -1 && obj.length) {
5336
5350
  obj.children("a.jstree-loading").removeClass("jstree-loading");
5337
- obj.removeData("jstree-is-loading");
5351
+ obj.removeData("jstree_is_loading");
5338
5352
  if (t === "success" && s.correct_state) {
5339
5353
  this.correct_state(obj);
5340
5354
  }
@@ -5373,7 +5387,7 @@
5373
5387
  function () {
5374
5388
  return !this.firstChild || !this.firstChild.tagName || this.firstChild.tagName !== "INS";
5375
5389
  }).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");
5376
- obj.removeData("jstree-is-loading");
5390
+ obj.removeData("jstree_is_loading");
5377
5391
  }
5378
5392
  this.clean_node(obj);
5379
5393
  if (s_call) {
@@ -5383,7 +5397,7 @@
5383
5397
  else {
5384
5398
  if (obj && obj !== -1) {
5385
5399
  obj.children("a.jstree-loading").removeClass("jstree-loading");
5386
- obj.removeData("jstree-is-loading");
5400
+ obj.removeData("jstree_is_loading");
5387
5401
  if (s.correct_state) {
5388
5402
  this.correct_state(obj);
5389
5403
  if (s_call) {
@@ -5424,8 +5438,7 @@
5424
5438
  })(jQuery);
5425
5439
 
5426
5440
 
5427
-
5428
- /*
5441
+ /*
5429
5442
  * jsTree themeroller plugin
5430
5443
  * Adds support for jQuery UI themes. Include this at the end of your plugins list, also make sure "themes" is not included.
5431
5444
  */
@@ -5437,13 +5450,13 @@
5437
5450
  .addClass("ui-widget-content")
5438
5451
  .addClass("jstree-themeroller")
5439
5452
  .delegate("a", "mouseenter.jstree", function (e) {
5440
- if (!$(e.currentTarget).hasClass("jstree-loading")) {
5441
- $(this).addClass(s.item_h);
5442
- }
5443
- })
5453
+ if (!$(e.currentTarget).hasClass("jstree-loading")) {
5454
+ $(this).addClass(s.item_h);
5455
+ }
5456
+ })
5444
5457
  .delegate("a", "mouseleave.jstree", function () {
5445
- $(this).removeClass(s.item_h);
5446
- })
5458
+ $(this).removeClass(s.item_h);
5459
+ })
5447
5460
  .bind("init.jstree", $.proxy(function (e, data) {
5448
5461
  data.inst.get_container().find("> ul > li > .jstree-loading > ins").addClass("ui-icon-refresh");
5449
5462
  this._themeroller(data.inst.get_container().find("> ul > li"));
@@ -5551,14 +5564,14 @@
5551
5564
  }
5552
5565
  },
5553
5566
  defaults : {
5554
- "opened" : "ui-icon-triangle-1-se",
5555
- "closed" : "ui-icon-triangle-1-e",
5556
- "item" : "ui-state-default",
5557
- "item_h" : "ui-state-hover",
5558
- "item_a" : "ui-state-active",
5559
- "item_open" : "ui-icon-folder-open",
5560
- "item_clsd" : "ui-icon-folder-collapsed",
5561
- "item_leaf" : "ui-icon-document"
5567
+ "opened" : "ui-icon-triangle-1-se",
5568
+ "closed" : "ui-icon-triangle-1-e",
5569
+ "item" : "ui-state-default",
5570
+ "item_h" : "ui-state-hover",
5571
+ "item_a" : "ui-state-active",
5572
+ "item_open" : "ui-icon-folder-open",
5573
+ "item_clsd" : "ui-icon-folder-collapsed",
5574
+ "item_leaf" : "ui-icon-document"
5562
5575
  }
5563
5576
  });
5564
5577
  $(function() {
@@ -5571,8 +5584,7 @@
5571
5584
  })(jQuery);
5572
5585
 
5573
5586
 
5574
-
5575
- /*
5587
+ /*
5576
5588
  * jsTree unique plugin
5577
5589
  * Forces different names amongst siblings (still a bit experimental)
5578
5590
  * NOTE: does not check language versions (it will not be possible to have nodes with the same title, even in different languages)
@@ -5669,7 +5681,6 @@
5669
5681
  })(jQuery);
5670
5682
 
5671
5683
 
5672
-
5673
5684
  /*
5674
5685
  * jsTree radio plugin
5675
5686
  * Inserts radios in front of every node
@@ -5752,29 +5763,20 @@
5752
5763
  else {
5753
5764
  $t.children(":radio").addClass("jstree-real-radio");
5754
5765
  }
5755
- if (c === "jstree-checked") {
5756
- $t.children(":radio").attr("checked", "checked");
5766
+ }
5767
+ if (!ts) {
5768
+ if (c === "jstree-checked" || $t.hasClass("jstree-checked") || $t.children(':checked').length) {
5769
+ $t.find("li").andSelf().addClass("jstree-checked").children(":radio").prop("checked", true);
5757
5770
  }
5758
5771
  }
5759
- if (c === "jstree-checked" && !ts) {
5760
- $t.find("li").addClass("jstree-checked");
5772
+ else {
5773
+ if ($t.hasClass("jstree-checked") || $t.children(':checked').length) {
5774
+ $t.addClass("jstree-checked").children(":radio").prop("checked", true);
5775
+ }
5761
5776
  }
5762
5777
  });
5763
5778
  });
5764
5779
  if (!ts) {
5765
- if (obj.length === 1 && obj.is("li")) {
5766
- this._repair_state(obj);
5767
- }
5768
- if (obj.is("li")) {
5769
- obj.each(function () {
5770
- _this._repair_state(this);
5771
- });
5772
- }
5773
- else {
5774
- obj.find("> ul > li").each(function () {
5775
- _this._repair_state(this);
5776
- });
5777
- }
5778
5780
  obj.find(".jstree-checked").parent().parent().each(function () {
5779
5781
  _this._repair_state(this);
5780
5782
  });
@@ -5791,13 +5793,13 @@
5791
5793
  if (state) {
5792
5794
  obj.removeClass("jstree-checked").addClass("jstree-unchecked");
5793
5795
  if (rc) {
5794
- obj.children(":radio").removeAttr("checked");
5796
+ obj.children(":radio").prop("checked", false);
5795
5797
  }
5796
5798
  }
5797
5799
  else {
5798
5800
  obj.removeClass("jstree-unchecked").addClass("jstree-checked");
5799
5801
  if (rc) {
5800
- obj.children(":radio").attr("checked", "checked");
5802
+ obj.children(":radio").prop("checked", true);
5801
5803
  }
5802
5804
  }
5803
5805
  }
@@ -5809,7 +5811,7 @@
5809
5811
  }
5810
5812
  coll.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
5811
5813
  if (rc) {
5812
- coll.children(":radio").removeAttr("checked");
5814
+ coll.children(":radio").prop("checked", false);
5813
5815
  }
5814
5816
  }
5815
5817
  else {
@@ -5819,7 +5821,7 @@
5819
5821
  }
5820
5822
  coll.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
5821
5823
  if (rc) {
5822
- coll.children(":radio").attr("checked", "checked");
5824
+ coll.children(":radio").prop("checked", true);
5823
5825
  }
5824
5826
  if (this.data.ui) {
5825
5827
  this.data.ui.last_selected = obj;
@@ -5832,14 +5834,14 @@
5832
5834
  if ($this.children("ul").children("li.jstree-checked, li.jstree-undetermined").length) {
5833
5835
  $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
5834
5836
  if (rc) {
5835
- $this.parentsUntil(".jstree", "li").andSelf().children(":radio").removeAttr("checked");
5837
+ $this.parentsUntil(".jstree", "li").andSelf().children(":radio").prop("checked", false);
5836
5838
  }
5837
5839
  return false;
5838
5840
  }
5839
5841
  else {
5840
5842
  $this.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");
5841
5843
  if (rc) {
5842
- $this.children(":radio").removeAttr("checked");
5844
+ $this.children(":radio").prop("checked", false);
5843
5845
  }
5844
5846
  }
5845
5847
  }
@@ -5847,14 +5849,14 @@
5847
5849
  if ($this.children("ul").children("li.jstree-unchecked, li.jstree-undetermined").length) {
5848
5850
  $this.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
5849
5851
  if (rc) {
5850
- $this.parentsUntil(".jstree", "li").andSelf().children(":radio").removeAttr("checked");
5852
+ $this.parentsUntil(".jstree", "li").andSelf().children(":radio").prop("checked", false);
5851
5853
  }
5852
5854
  return false;
5853
5855
  }
5854
5856
  else {
5855
5857
  $this.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
5856
5858
  if (rc) {
5857
- $this.children(":radio").attr("checked", "checked");
5859
+ $this.children(":radio").prop("checked", true);
5858
5860
  }
5859
5861
  }
5860
5862
  }
@@ -5925,6 +5927,10 @@
5925
5927
  if (!obj.length) {
5926
5928
  return;
5927
5929
  }
5930
+ if (this._get_settings().radio.two_state) {
5931
+ obj.find('li').andSelf().not('.jstree-checked').removeClass('jstree-undetermined').addClass('jstree-unchecked').children(':radio').prop('checked', true);
5932
+ return;
5933
+ }
5928
5934
  var rc = this._get_settings().radio.real_radios,
5929
5935
  a = obj.find("> ul > .jstree-checked").length,
5930
5936
  b = obj.find("> ul > .jstree-undetermined").length,
@@ -5943,7 +5949,7 @@
5943
5949
  else {
5944
5950
  obj.parentsUntil(".jstree", "li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
5945
5951
  if (rc) {
5946
- obj.parentsUntil(".jstree", "li").andSelf().children(":radio").removeAttr("checked");
5952
+ obj.parentsUntil(".jstree", "li").andSelf().children(":radio").prop("checked", false);
5947
5953
  }
5948
5954
  }
5949
5955
  },
@@ -5952,7 +5958,7 @@
5952
5958
  var _this = this,
5953
5959
  s = this.data.ui.to_select;
5954
5960
  s = $.map($.makeArray(s), function (n) {
5955
- return "#" + n.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.");
5961
+ return "#" + n.toString().replace(/^#/, "").replace(/\\\//g, "/").replace(/\//g, "\\\/").replace(/\\\./g, ".").replace(/\./g, "\\.").replace(/\:/g, "\\:");
5956
5962
  });
5957
5963
  this.deselect_all();
5958
5964
  $.each(s, function (i, val) {
@@ -5982,7 +5988,6 @@
5982
5988
  })(jQuery);
5983
5989
 
5984
5990
 
5985
-
5986
5991
  /*
5987
5992
  * jsTree wholerow plugin
5988
5993
  * Makes select and hover work on the entire width of the node
@@ -6032,13 +6037,13 @@
6032
6037
  }
6033
6038
  }, this))
6034
6039
  .delegate(".jstree-wholerow-span, ins.jstree-icon, li", "click.jstree", function (e) {
6035
- var n = $(e.currentTarget);
6036
- if (e.target.tagName === "A" || (e.target.tagName === "INS" && n.closest("li").is(".jstree-open, .jstree-closed"))) {
6037
- return;
6038
- }
6039
- n.closest("li").children("a:visible:eq(0)").click();
6040
- e.stopImmediatePropagation();
6041
- })
6040
+ var n = $(e.currentTarget);
6041
+ if (e.target.tagName === "A" || (e.target.tagName === "INS" && n.closest("li").is(".jstree-open, .jstree-closed"))) {
6042
+ return;
6043
+ }
6044
+ n.closest("li").children("a:visible:eq(0)").click();
6045
+ e.stopImmediatePropagation();
6046
+ })
6042
6047
  .delegate("li", "mouseover.jstree", $.proxy(function (e) {
6043
6048
  e.stopImmediatePropagation();
6044
6049
  if ($(e.currentTarget).children(".jstree-hovered, .jstree-clicked").length) {
@@ -6094,7 +6099,7 @@
6094
6099
  function () {
6095
6100
  this.removeAttribute("id");
6096
6101
  }).end()
6097
- );
6102
+ );
6098
6103
  }
6099
6104
  }
6100
6105
  }
@@ -6126,7 +6131,6 @@
6126
6131
  })(jQuery);
6127
6132
 
6128
6133
 
6129
-
6130
6134
  /*
6131
6135
  * jsTree model plugin
6132
6136
  * This plugin gets jstree to use a class model to retrieve data, creating great dynamism
@@ -6207,5 +6211,6 @@
6207
6211
  });
6208
6212
  })(jQuery);
6209
6213
 
6210
- })
6211
- ();
6214
+
6215
+
6216
+ })();