compass-jquery-plugin 0.3.3.0 → 0.3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +4 -4
- data/VERSION.yml +1 -1
- data/lib/handle_js_files.rb +1 -1
- data/lib/jquery/gridify/grid_column.rb +4 -0
- data/lib/jquery/gridify/grid_options.rb +5 -1
- data/lib/jquery/gridify/grid_view.rb +8 -3
- data/templates/dynatree/jquery.dynatree.js +184 -73
- data/templates/dynatree/jquery.dynatree.min.js +78 -76
- data/templates/emulators/emulators/galaxy.tab.7.7.landscape.png +0 -0
- data/templates/emulators/emulators/{palm.pre.2.landscape.scss → galaxy.tab.7.7.landscape.scss} +7 -7
- data/templates/emulators/emulators/galaxy.tab.7.7.portrait.png +0 -0
- data/templates/emulators/emulators/{palm.pre.2.portrait.scss → galaxy.tab.7.7.portrait.scss} +7 -7
- data/templates/emulators/manifest.rb +4 -4
- data/templates/graphics/config/initializers/graphics.rb +1 -1
- data/templates/graphics/highcharts/dark-blue.js +257 -159
- data/templates/graphics/highcharts/dark-blue.min.js +4 -2
- data/templates/graphics/highcharts/dark-green.js +257 -159
- data/templates/graphics/highcharts/dark-green.min.js +4 -2
- data/templates/graphics/highcharts/gray.js +252 -154
- data/templates/graphics/highcharts/gray.min.js +4 -2
- data/templates/graphics/highcharts/grid.js +84 -84
- data/templates/graphics/highcharts/highslide-full.min.js +3 -3
- data/templates/graphics/highcharts/highslide.js +3391 -0
- data/templates/graphics/highcharts/highslide.min.js +132 -0
- data/templates/graphics/jquery.ganttView.min.js +4 -4
- data/templates/graphics/jquery.highcharts.js +15379 -1071
- data/templates/graphics/jquery.highcharts.min.js +384 -167
- data/templates/graphics/jquery.sparkline.min.js +2 -2
- data/templates/graphics/manifest.rb +2 -0
- data/templates/ical/jquery.ical.min.js +46 -47
- data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +2 -2
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +2 -2
- data/templates/jqgrid/i18n/jqgrid/locale-fi.js +20 -19
- data/templates/jqgrid/i18n/jqgrid/locale-fi.min.js +7 -6
- data/templates/jqgrid/i18n/jqgrid/locale-is.js +28 -28
- data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +6 -6
- data/templates/jqgrid/i18n/jqgrid/locale-th.js +134 -0
- data/templates/jqgrid/i18n/jqgrid/locale-th.min.js +6 -0
- data/templates/jqgrid/jquery.jqGrid.js +674 -598
- data/templates/jqgrid/jquery.jqGrid.min.js +444 -441
- data/templates/jqgrid/jquery/jqGrid.scss +0 -3
- data/templates/jqgrid/manifest.rb +2 -0
- data/templates/jqtouch/jquery.jqtouch.js +201 -156
- data/templates/jqtouch/jquery.jqtouch.min.js +1 -1
- data/templates/jqtouch/jquery/touch/apple.scss +2 -2
- data/templates/jqtouch/jquery/touch/default.scss +2 -2
- data/templates/jquery/amplify.store.js +111 -78
- data/templates/jquery/amplify.store.min.js +6 -6
- data/templates/jquery/history.js +3 -3
- data/templates/jquery/i18n/jquery.ui/datepicker-nl.js +1 -1
- data/templates/jquery/i18n/jquery.ui/datepicker-nl.min.js +1 -1
- data/templates/jquery/jquery-ui.js +1286 -1042
- data/templates/jquery/jquery-ui.min.js +320 -316
- data/templates/jquery/jquery.contextMenu.js +2 -2
- data/templates/jquery/jquery.easing.js +152 -152
- data/templates/jquery/jquery.easing.min.js +7 -7
- data/templates/jquery/jquery.farbtastic.min.js +2 -2
- data/templates/jquery/jquery.form.js +30 -30
- data/templates/jquery/jquery.haml.min.js +5 -5
- data/templates/jquery/jquery.hotkeys.min.js +1 -1
- data/templates/jquery/jquery.js +419 -311
- data/templates/jquery/jquery.layout.js +59 -40
- data/templates/jquery/jquery.min.js +176 -176
- data/templates/jquery/jquery.themeswitchertool.js +37 -37
- data/templates/jquery/jquery.tmpl.js +4 -4
- data/templates/jquery/jquery.tmpl.min.js +9 -9
- data/templates/jquery/jquery.tmplPlus.min.js +3 -3
- data/templates/jquery/jquery.tokeninput.js +613 -490
- data/templates/jquery/jquery.tokeninput.min.js +17 -14
- data/templates/jquery/jquery/ui/_theme.scss +39 -63
- data/templates/jquery/json.js +31 -15
- data/templates/jstree/jquery.jstree.js +415 -410
- data/templates/jstree/jquery.jstree.min.js +134 -133
- data/templates/markitup/jquery.markitup.js +567 -560
- data/templates/markitup/jquery.markitup.min.js +1 -1
- data/templates/markitup/jquery/markitup/sets/default.scss +7 -3
- data/templates/markitup/jquery/markitup/sets/default/list-bullet.png +0 -0
- data/templates/markitup/jquery/markitup/sets/default/list-numeric.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup.scss +3 -10
- data/templates/markitup/jquery/markitup/skins/markitup/bg-container.png +0 -0
- data/templates/markitup/jquery/markitup/skins/markitup/menu.png +0 -0
- data/templates/markitup/jquery/markitup/skins/simple.scss +2 -3
- data/templates/markitup/jquery/markitup/skins/simple/menu.png +0 -0
- data/templates/markitup/manifest.rb +2 -0
- data/templates/markitup/markitup/jquery.markitup.set.default.js +21 -21
- data/templates/markitup/markitup/jquery.markitup.set.default.min.js +3 -2
- data/templates/mobile/jquery.mobile.js +5230 -2846
- data/templates/mobile/jquery.mobile.min.js +192 -46
- data/templates/mobile/jquery/mobile/_base.scss +141 -18
- data/templates/mobile/jquery/mobile/default.scss +263 -66
- data/templates/mobile/jquery/mobile/default/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/default/icons-36-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia.scss +242 -53
- data/templates/mobile/jquery/mobile/valencia/icons-18-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-18-white.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-black.png +0 -0
- data/templates/mobile/jquery/mobile/valencia/icons-36-white.png +0 -0
- data/templates/tiny_mce/manifest.rb +2 -0
- data/templates/tiny_mce/tiny_mce/langs/de.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advhr/rule.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advimage/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advimage/image.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advimage/js/image.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advlink/link.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/advlist/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autolink/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autolink/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autoresize/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/autosave/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/contextmenu/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/emotions/emotions.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/example/dialog.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/example_dependency/editor_plugin.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/example_dependency/editor_plugin_src.js +1 -0
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/fullpage/fullpage.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/inlinepopups/template.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/lists/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/lists/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/js/media.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/langs/en_dlg.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/media/media.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/noneditable/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/paste/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/paste/pastetext.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/paste/pasteword.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/preview/example.html +16 -17
- data/templates/tiny_mce/tiny_mce/plugins/preview/preview.html +9 -10
- data/templates/tiny_mce/tiny_mce/plugins/searchreplace/searchreplace.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/spellchecker/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/style/js/props.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/style/props.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/tabfocus/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/cell.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/js/cell.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/js/row.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/langs/de_dlg.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/langs/en_dlg.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/merge_cells.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/row.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/table/table.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/template/blank.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/template/template.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/wordcount/editor_plugin_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/abbr.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/acronym.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/attributes.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/cite.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/del.htm +1 -1
- data/templates/tiny_mce/tiny_mce/plugins/xhtmlxtras/ins.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/about.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/anchor.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/color_picker.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template.js +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/editor_template_src.js +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/image.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/img/flash.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/js/image.js +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/langs/de.js +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/link.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/content.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/dialog.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/default/ui.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/highcontrast/ui.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/content.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/dialog.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/templates/tiny_mce/tiny_mce/themes/advanced/skins/o2k7/ui.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/advanced/source_editor.htm +1 -1
- data/templates/tiny_mce/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/templates/tiny_mce/tiny_mce/themes/simple/skins/default/ui.css +1 -1
- data/templates/tiny_mce/tiny_mce/themes/simple/skins/o2k7/ui.css +1 -1
- data/templates/tiny_mce/tiny_mce/tiny_mce.js +1 -1
- data/templates/tools/flowplayer.min.js +1 -1
- data/templates/tools/jquery.tools.js +17 -17
- data/templates/tools/jquery.tools.min.js +22 -22
- metadata +17 -9
- data/templates/emulators/emulators/palm.pre.2.landscape.png +0 -0
- data/templates/emulators/emulators/palm.pre.2.portrait.png +0 -0
data/README.md
CHANGED
|
@@ -12,17 +12,17 @@ Description
|
|
|
12
12
|
|
|
13
13
|
A Sass-based Meta-Framework for Compass that allows you to mix and match any of the following:
|
|
14
14
|
|
|
15
|
-
* jquery-rails with jQuery 1.6.
|
|
15
|
+
* jquery-rails with jQuery 1.6.3 and jQuery.UI 1.8.16 including themes
|
|
16
16
|
* jQuery Tools 1.2.5
|
|
17
17
|
* jquery.jstree.js V1.0rc3
|
|
18
18
|
* jquery.dynatree.js V1.1.1
|
|
19
19
|
* jquery.ribbon.js
|
|
20
|
-
* jquery.jqGrid.js V4.
|
|
21
|
-
* jquery.tinymce.js V3.4
|
|
20
|
+
* jquery.jqGrid.js V4.1.2 (with minor changes to make it RESTful)
|
|
21
|
+
* jquery.tinymce.js V3.4.4
|
|
22
22
|
|
|
23
23
|
and for mobile devices <i>(using pure haml/sass without compass)</i>:
|
|
24
24
|
|
|
25
|
-
* jquery.mobile.js 1.
|
|
25
|
+
* jquery.mobile.js 1.0b2
|
|
26
26
|
* jquery.jqtouch.js V1.0b3
|
|
27
27
|
|
|
28
28
|
This library requires [Compass][3].
|
data/VERSION.yml
CHANGED
data/lib/handle_js_files.rb
CHANGED
|
@@ -2,7 +2,7 @@ require 'fileutils'
|
|
|
2
2
|
require 'find'
|
|
3
3
|
|
|
4
4
|
GEM_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
|
5
|
-
GOOGLE_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'google-compiler-
|
|
5
|
+
GOOGLE_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'google-compiler-20110615.jar')
|
|
6
6
|
YUI_JS_COMPRESSOR = File.join(GEM_ROOT, 'lib', 'yuicompressor-2.4.4.jar')
|
|
7
7
|
|
|
8
8
|
def compress_js(scripts, compressor)
|
|
@@ -32,6 +32,8 @@ module Gridify
|
|
|
32
32
|
# visiblity
|
|
33
33
|
#:always_hidden, # (false)
|
|
34
34
|
:sort_type,
|
|
35
|
+
:search_type,
|
|
36
|
+
:search_rules,
|
|
35
37
|
:summary_type,
|
|
36
38
|
:summary_tpl,
|
|
37
39
|
:hidden # initial hide state (false)
|
|
@@ -126,6 +128,8 @@ module Gridify
|
|
|
126
128
|
vals[:editrules] = validations if editable && validations
|
|
127
129
|
|
|
128
130
|
vals[:sort_type] = sort_type if sort_type
|
|
131
|
+
vals[:search_type] = search_type if search_type
|
|
132
|
+
vals[:search_rules] = search_rules if search_rules
|
|
129
133
|
vals[:summaryType] = summary_type if summary_type
|
|
130
134
|
vals[:summaryTpl] = summary_tpl if summary_tpl
|
|
131
135
|
# and more...
|
|
@@ -75,7 +75,11 @@ module Gridify
|
|
|
75
75
|
:edit_button,
|
|
76
76
|
:delete_button,
|
|
77
77
|
:search_button, # enable search button and dialog
|
|
78
|
-
:
|
|
78
|
+
:search_multiple, # instead of search_button
|
|
79
|
+
:search_group,
|
|
80
|
+
:search_resize,
|
|
81
|
+
:search_close_esc,
|
|
82
|
+
:search_show_query,
|
|
79
83
|
:search_toolbar, # toggleable search bar, true or :visible, :hidden (other options?) (nil)
|
|
80
84
|
:refresh_button,
|
|
81
85
|
:jqgrid_nav_options, # native jqGrid button options (added to 2nd arg in navGrid method)
|
|
@@ -90,8 +90,13 @@ module Gridify
|
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
def search_button_options
|
|
93
|
-
if
|
|
94
|
-
merge_options_defaults(
|
|
93
|
+
if search_multiple
|
|
94
|
+
merge_options_defaults(search_multiple,
|
|
95
|
+
'multipleSearch' => true,
|
|
96
|
+
'multipleGroup' => search_group.present? && search_group ? true : false,
|
|
97
|
+
'resize' => search_resize.present? && search_resize ? true : false,
|
|
98
|
+
'closeOnEscape' => search_close_esc.present? && search_close_esc ? true : false,
|
|
99
|
+
'showQuery' => search_show_query.present? && search_show_query ? true : false)
|
|
95
100
|
else
|
|
96
101
|
merge_options_defaults(search_button)
|
|
97
102
|
end
|
|
@@ -268,7 +273,7 @@ module Gridify
|
|
|
268
273
|
'edit' => edit_button.present?,
|
|
269
274
|
'add' => add_button.present?,
|
|
270
275
|
'del' => delete_button.present?,
|
|
271
|
-
'search' => search_button.present? ||
|
|
276
|
+
'search' => search_button.present? || search_multiple.present?,
|
|
272
277
|
'view' => view_button.present?,
|
|
273
278
|
'refresh' => refresh_button.present?
|
|
274
279
|
}.merge(jqgrid_nav_options||{})
|
|
@@ -265,13 +265,14 @@ var DTNodeStatus_Ok = 0;
|
|
|
265
265
|
* </li>
|
|
266
266
|
*/
|
|
267
267
|
// this.tree.logDebug("%s.render(%s)", this, useEffects);
|
|
268
|
-
|
|
268
|
+
// ---
|
|
269
269
|
var tree = this.tree,
|
|
270
270
|
parent = this.parent,
|
|
271
271
|
data = this.data,
|
|
272
272
|
opts = tree.options,
|
|
273
273
|
cn = opts.classNames,
|
|
274
|
-
isLastSib = this.isLastSibling()
|
|
274
|
+
isLastSib = this.isLastSibling(),
|
|
275
|
+
firstTime = false;
|
|
275
276
|
|
|
276
277
|
if (!parent && !this.ul) {
|
|
277
278
|
// Root node has only a <ul>
|
|
@@ -285,6 +286,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
285
286
|
} else if (parent) {
|
|
286
287
|
// Create <li><span /> </li>
|
|
287
288
|
if (! this.li) {
|
|
289
|
+
firstTime = true;
|
|
288
290
|
this.li = document.createElement("li");
|
|
289
291
|
this.li.dtnode = this;
|
|
290
292
|
if (data.key && opts.generateIds) {
|
|
@@ -347,19 +349,23 @@ var DTNodeStatus_Ok = 0;
|
|
|
347
349
|
+ (this.bExpanded ? "e" : "c")
|
|
348
350
|
+ (data.isLazy && this.childList === null ? "d" : "")
|
|
349
351
|
+ (isLastSib ? "l" : "")
|
|
350
|
-
|
|
352
|
+
);
|
|
351
353
|
cnList.push(cn.combinedIconPrefix
|
|
352
354
|
+ (this.bExpanded ? "e" : "c")
|
|
353
355
|
+ (data.isFolder ? "f" : "")
|
|
354
|
-
|
|
356
|
+
);
|
|
355
357
|
this.span.className = cnList.join(" ");
|
|
356
358
|
|
|
357
359
|
// TODO: we should not set this in the <span> tag also, if we set it here:
|
|
358
360
|
this.li.className = isLastSib ? cn.lastsib : "";
|
|
359
361
|
|
|
362
|
+
// Allow tweaking, binding, after node was created for the first time
|
|
363
|
+
if (firstTime && opts.onCreate) {
|
|
364
|
+
opts.onCreate.call(tree, this, this.span);
|
|
365
|
+
}
|
|
360
366
|
// Hide children, if node is collapsed
|
|
361
367
|
// this.ul.style.display = ( this.bExpanded || !parent ) ? "" : "none";
|
|
362
|
-
// Allow tweaking
|
|
368
|
+
// Allow tweaking after node state was rendered
|
|
363
369
|
if (opts.onRender) {
|
|
364
370
|
opts.onRender.call(tree, this, this.span);
|
|
365
371
|
}
|
|
@@ -401,6 +407,9 @@ var DTNodeStatus_Ok = 0;
|
|
|
401
407
|
},
|
|
402
408
|
|
|
403
409
|
getChildren: function() {
|
|
410
|
+
if (this.hasChildren() === undefined) {
|
|
411
|
+
return undefined; // Lazy node: unloaded, currently loading, or load error
|
|
412
|
+
}
|
|
404
413
|
return this.childList;
|
|
405
414
|
},
|
|
406
415
|
|
|
@@ -503,7 +512,10 @@ var DTNodeStatus_Ok = 0;
|
|
|
503
512
|
return;
|
|
504
513
|
}
|
|
505
514
|
cmp = cmp || function(a, b) {
|
|
506
|
-
|
|
515
|
+
// return a.data.title === b.data.title ? 0 : a.data.title > b.data.title ? 1 : -1;
|
|
516
|
+
var x = a.data.title.toLowerCase(),
|
|
517
|
+
y = b.data.title.toLowerCase();
|
|
518
|
+
return x === y ? 0 : x > y ? 1 : -1;
|
|
507
519
|
};
|
|
508
520
|
cl.sort(cmp);
|
|
509
521
|
if (deep) {
|
|
@@ -527,6 +539,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
527
539
|
// I've seen exceptions here with loadKeyPath...
|
|
528
540
|
if (this.ul) {
|
|
529
541
|
this.ul.removeChild(firstChild.li);
|
|
542
|
+
firstChild.li = null; // avoid leaks (issue 215)
|
|
530
543
|
}
|
|
531
544
|
} catch(e) {
|
|
532
545
|
}
|
|
@@ -816,16 +829,62 @@ var DTNodeStatus_Ok = 0;
|
|
|
816
829
|
$(this.span).removeClass(this.tree.options.classNames.partsel);
|
|
817
830
|
}
|
|
818
831
|
},
|
|
832
|
+
/**
|
|
833
|
+
* Fix selection and partsel status, of parent nodes, according to current status of
|
|
834
|
+
* end nodes.
|
|
835
|
+
*/
|
|
836
|
+
_updatePartSelectionState: function() {
|
|
837
|
+
// alert("_updatePartSelectionState " + this);
|
|
838
|
+
// this.tree.logDebug("_updatePartSelectionState() - %o", this);
|
|
839
|
+
var sel;
|
|
840
|
+
// Return `true` or `false` for end nodes and remove part-sel flag
|
|
841
|
+
if (! this.hasChildren()) {
|
|
842
|
+
sel = (this.bSelected && !this.data.unselectable && !this.data.isStatusNode);
|
|
843
|
+
this._setSubSel(false);
|
|
844
|
+
return sel;
|
|
845
|
+
}
|
|
846
|
+
// Return `true`, `false`, or `undefined` for parent nodes
|
|
847
|
+
var i, l,
|
|
848
|
+
cl = this.childList,
|
|
849
|
+
allSelected = true,
|
|
850
|
+
allDeselected = true;
|
|
851
|
+
for (i = 0,l = cl.length; i < l; i++) {
|
|
852
|
+
var n = cl[i],
|
|
853
|
+
s = n._updatePartSelectionState();
|
|
854
|
+
if (s !== false) {
|
|
855
|
+
allDeselected = false;
|
|
856
|
+
}
|
|
857
|
+
if (s !== true) {
|
|
858
|
+
allSelected = false;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
if (allSelected) {
|
|
862
|
+
sel = true;
|
|
863
|
+
} else if (allDeselected) {
|
|
864
|
+
sel = false;
|
|
865
|
+
} else {
|
|
866
|
+
sel = undefined;
|
|
867
|
+
}
|
|
868
|
+
this._setSubSel(sel === undefined);
|
|
869
|
+
this.bSelected = (sel === true);
|
|
870
|
+
return sel;
|
|
871
|
+
},
|
|
819
872
|
|
|
873
|
+
/**
|
|
874
|
+
* Fix selection status, after this node was (de)selected in multi-hier mode.
|
|
875
|
+
* This includes (de)selecting all children.
|
|
876
|
+
*/
|
|
820
877
|
_fixSelectionState: function() {
|
|
821
|
-
|
|
822
|
-
// this.tree.logDebug("_fixSelectionState(%
|
|
878
|
+
// alert("_fixSelectionState " + this);
|
|
879
|
+
// this.tree.logDebug("_fixSelectionState(%s) - %o", this.bSelected, this);
|
|
823
880
|
var p, i, l;
|
|
824
881
|
if (this.bSelected) {
|
|
825
882
|
// Select all children
|
|
826
883
|
this.visit(function(node) {
|
|
827
884
|
node.parent._setSubSel(true);
|
|
828
|
-
node.
|
|
885
|
+
if (!node.data.unselectable) {
|
|
886
|
+
node._select(true, false, false);
|
|
887
|
+
}
|
|
829
888
|
});
|
|
830
889
|
// Select parents, if all children are selected
|
|
831
890
|
p = this.parent;
|
|
@@ -834,7 +893,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
834
893
|
var allChildsSelected = true;
|
|
835
894
|
for (i = 0,l = p.childList.length; i < l; i++) {
|
|
836
895
|
var n = p.childList[i];
|
|
837
|
-
if (!n.bSelected && !n.data.isStatusNode) {
|
|
896
|
+
if (!n.bSelected && !n.data.isStatusNode && !n.data.unselectable) {
|
|
838
897
|
allChildsSelected = false;
|
|
839
898
|
break;
|
|
840
899
|
}
|
|
@@ -943,6 +1002,10 @@ var DTNodeStatus_Ok = 0;
|
|
|
943
1002
|
return this.bSelected;
|
|
944
1003
|
},
|
|
945
1004
|
|
|
1005
|
+
isLazy: function() {
|
|
1006
|
+
return !!this.data.isLazy;
|
|
1007
|
+
},
|
|
1008
|
+
|
|
946
1009
|
_loadContent: function() {
|
|
947
1010
|
try {
|
|
948
1011
|
var opts = this.tree.options;
|
|
@@ -1012,6 +1075,10 @@ var DTNodeStatus_Ok = 0;
|
|
|
1012
1075
|
}
|
|
1013
1076
|
},
|
|
1014
1077
|
|
|
1078
|
+
isExpanded: function() {
|
|
1079
|
+
return this.bExpanded;
|
|
1080
|
+
},
|
|
1081
|
+
|
|
1015
1082
|
expand: function(flag) {
|
|
1016
1083
|
flag = (flag !== false);
|
|
1017
1084
|
if (!this.childList && !this.data.isLazy && flag) {
|
|
@@ -1472,9 +1539,9 @@ var DTNodeStatus_Ok = 0;
|
|
|
1472
1539
|
* Internal function to add one single DynatreeNode as a child.
|
|
1473
1540
|
*
|
|
1474
1541
|
*/
|
|
1475
|
-
var tree = this.tree
|
|
1476
|
-
|
|
1477
|
-
|
|
1542
|
+
var tree = this.tree,
|
|
1543
|
+
opts = tree.options,
|
|
1544
|
+
pers = tree.persistence;
|
|
1478
1545
|
|
|
1479
1546
|
// tree.logDebug("%s._addChildNode(%o)", this, dtnode);
|
|
1480
1547
|
|
|
@@ -1498,7 +1565,6 @@ var DTNodeStatus_Ok = 0;
|
|
|
1498
1565
|
throw "<beforeNode> must be a child of <this>";
|
|
1499
1566
|
}
|
|
1500
1567
|
this.childList.splice(iBefore, 0, dtnode);
|
|
1501
|
-
// alert(this.childList);
|
|
1502
1568
|
} else {
|
|
1503
1569
|
// Append node
|
|
1504
1570
|
this.childList.push(dtnode);
|
|
@@ -1512,10 +1578,10 @@ var DTNodeStatus_Ok = 0;
|
|
|
1512
1578
|
if (opts.persist && pers.cookiesFound && isInitializing) {
|
|
1513
1579
|
// Init status from cookies
|
|
1514
1580
|
// tree.logDebug("init from cookie, pa=%o, dk=%o", pers.activeKey, dtnode.data.key);
|
|
1515
|
-
if (pers.activeKey
|
|
1581
|
+
if (pers.activeKey === dtnode.data.key) {
|
|
1516
1582
|
tree.activeNode = dtnode;
|
|
1517
1583
|
}
|
|
1518
|
-
if (pers.focusedKey
|
|
1584
|
+
if (pers.focusedKey === dtnode.data.key) {
|
|
1519
1585
|
tree.focusNode = dtnode;
|
|
1520
1586
|
}
|
|
1521
1587
|
dtnode.bExpanded = ($.inArray(dtnode.data.key, pers.expandedKeyList) >= 0);
|
|
@@ -1671,12 +1737,17 @@ var DTNodeStatus_Ok = 0;
|
|
|
1671
1737
|
if (options.postProcess) {
|
|
1672
1738
|
data = options.postProcess.call(this, data, this.dataType);
|
|
1673
1739
|
}
|
|
1740
|
+
// Process ASPX WebMethod JSON object inside "d" property
|
|
1741
|
+
// http://code.google.com/p/dynatree/issues/detail?id=202
|
|
1742
|
+
else if (data && data.hasOwnProperty("d")) {
|
|
1743
|
+
data = data.d;
|
|
1744
|
+
}
|
|
1674
1745
|
if (!$.isArray(data) || data.length !== 0) {
|
|
1675
1746
|
self.addChild(data, null);
|
|
1676
1747
|
}
|
|
1677
1748
|
self.tree.phase = "postInit";
|
|
1678
1749
|
if (orgSuccess) {
|
|
1679
|
-
orgSuccess.call(options, self);
|
|
1750
|
+
orgSuccess.call(options, self, data, textStatus);
|
|
1680
1751
|
}
|
|
1681
1752
|
self.tree.logDebug("trigger " + eventType);
|
|
1682
1753
|
self.tree.$tree.trigger(eventType, [self, true]);
|
|
@@ -1770,14 +1841,14 @@ var DTNodeStatus_Ok = 0;
|
|
|
1770
1841
|
}
|
|
1771
1842
|
} else {
|
|
1772
1843
|
targetParent.childList = [ this ];
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1844
|
+
}
|
|
1845
|
+
// Parent has no <ul> tag yet:
|
|
1846
|
+
if (!targetParent.ul) {
|
|
1847
|
+
// This is the parent's first child: create UL tag
|
|
1848
|
+
// (Hidden, because it will be
|
|
1849
|
+
targetParent.ul = document.createElement("ul");
|
|
1850
|
+
targetParent.ul.style.display = "none";
|
|
1851
|
+
targetParent.li.appendChild(targetParent.ul);
|
|
1781
1852
|
}
|
|
1782
1853
|
// Add to target DOM parent
|
|
1783
1854
|
targetParent.ul.appendChild(this.li);
|
|
@@ -1852,7 +1923,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
1852
1923
|
return ts.toDict();
|
|
1853
1924
|
};
|
|
1854
1925
|
// Make available in global scope
|
|
1855
|
-
getDynaTreePersistData = DynaTreeStatus._getTreePersistData;
|
|
1926
|
+
getDynaTreePersistData = DynaTreeStatus._getTreePersistData; // TODO: deprecated
|
|
1856
1927
|
|
|
1857
1928
|
|
|
1858
1929
|
DynaTreeStatus.prototype = {
|
|
@@ -1967,6 +2038,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
1967
2038
|
// --- Static members ----------------------------------------------------------
|
|
1968
2039
|
|
|
1969
2040
|
DynaTree.version = "$Version:$";
|
|
2041
|
+
|
|
1970
2042
|
/*
|
|
1971
2043
|
DynaTree._initTree = function() {
|
|
1972
2044
|
};
|
|
@@ -2108,6 +2180,10 @@ var DTNodeStatus_Ok = 0;
|
|
|
2108
2180
|
}
|
|
2109
2181
|
|
|
2110
2182
|
this._checkConsistency();
|
|
2183
|
+
// Fix part-sel flags
|
|
2184
|
+
if (!isLazy && opts.selectMode == 3) {
|
|
2185
|
+
root._updatePartSelectionState();
|
|
2186
|
+
}
|
|
2111
2187
|
// Render html markup
|
|
2112
2188
|
this.logDebug("Dynatree._load(): render nodes...");
|
|
2113
2189
|
this.enableUpdate(prevFlag);
|
|
@@ -2129,31 +2205,17 @@ var DTNodeStatus_Ok = 0;
|
|
|
2129
2205
|
this.logDebug("Focus on init: %o", this.focusNode);
|
|
2130
2206
|
this.focusNode.focus();
|
|
2131
2207
|
}
|
|
2132
|
-
if (!isLazy
|
|
2133
|
-
opts.onPostInit
|
|
2208
|
+
if (!isLazy) {
|
|
2209
|
+
if (opts.onPostInit) {
|
|
2210
|
+
opts.onPostInit.call(this, isReloading, false);
|
|
2211
|
+
}
|
|
2212
|
+
if (callback) {
|
|
2213
|
+
callback.call(this, "ok");
|
|
2214
|
+
}
|
|
2134
2215
|
}
|
|
2135
2216
|
this.phase = "idle";
|
|
2136
2217
|
},
|
|
2137
2218
|
|
|
2138
|
-
// _setNoUpdate: function(silent) {
|
|
2139
|
-
// // TODO: set options to disable and re-enable updates while loading
|
|
2140
|
-
// var opts = this.options;
|
|
2141
|
-
// var prev = {
|
|
2142
|
-
// fx: opts.fx,
|
|
2143
|
-
// autoFocus: opts.autoFocus,
|
|
2144
|
-
// autoCollapse: opts.autoCollapse };
|
|
2145
|
-
// if(silent === true){
|
|
2146
|
-
// opts.autoFocus = false;
|
|
2147
|
-
// opts.fx = null;
|
|
2148
|
-
// opts.autoCollapse = false;
|
|
2149
|
-
// } else {
|
|
2150
|
-
// opts.autoFocus = silent.autoFocus;
|
|
2151
|
-
// opts.fx = silent.fx;
|
|
2152
|
-
// opts.autoCollapse = silent.autoCollapse;
|
|
2153
|
-
// }
|
|
2154
|
-
// return prev;
|
|
2155
|
-
// },
|
|
2156
|
-
|
|
2157
2219
|
_reloadAjax: function(callback) {
|
|
2158
2220
|
// Reload
|
|
2159
2221
|
var opts = this.options;
|
|
@@ -2177,27 +2239,33 @@ var DTNodeStatus_Ok = 0;
|
|
|
2177
2239
|
ajaxOpts.data.selectedKeyList = pers.selectedKeyList.join(",");
|
|
2178
2240
|
}
|
|
2179
2241
|
// Set up onPostInit callback to be called when Ajax returns
|
|
2180
|
-
if (
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2242
|
+
if (ajaxOpts.success) {
|
|
2243
|
+
this.logWarning("initAjax: success callback is ignored; use onPostInit instead.");
|
|
2244
|
+
}
|
|
2245
|
+
if (ajaxOpts.error) {
|
|
2246
|
+
this.logWarning("initAjax: error callback is ignored; use onPostInit instead.");
|
|
2247
|
+
}
|
|
2248
|
+
var isReloading = pers.isReloading();
|
|
2249
|
+
ajaxOpts.success = function(dtnode, data, textStatus) {
|
|
2250
|
+
if (opts.selectMode == 3) {
|
|
2251
|
+
dtnode.tree.tnRoot._updatePartSelectionState();
|
|
2186
2252
|
}
|
|
2187
|
-
|
|
2188
|
-
ajaxOpts.success = function(dtnode) {
|
|
2253
|
+
if (opts.onPostInit) {
|
|
2189
2254
|
opts.onPostInit.call(dtnode.tree, isReloading, false);
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
}
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2255
|
+
}
|
|
2256
|
+
if (callback) {
|
|
2257
|
+
callback.call(dtnode.tree, "ok");
|
|
2258
|
+
}
|
|
2259
|
+
};
|
|
2260
|
+
ajaxOpts.error = function(dtnode, XMLHttpRequest, textStatus, errorThrown) {
|
|
2261
|
+
if (opts.onPostInit) {
|
|
2262
|
+
opts.onPostInit.call(dtnode.tree, isReloading, true, XMLHttpRequest, textStatus, errorThrown);
|
|
2263
|
+
}
|
|
2264
|
+
if (callback) {
|
|
2265
|
+
callback.call(dtnode.tree, "error", XMLHttpRequest, textStatus, errorThrown);
|
|
2266
|
+
}
|
|
2267
|
+
};
|
|
2268
|
+
// }
|
|
2201
2269
|
this.logDebug("Dynatree._init(): send Ajax request...");
|
|
2202
2270
|
this.tnRoot.appendAjax(ajaxOpts);
|
|
2203
2271
|
},
|
|
@@ -2400,7 +2468,8 @@ var DTNodeStatus_Ok = 0;
|
|
|
2400
2468
|
$liA = $li.find(">a:first"),
|
|
2401
2469
|
title,
|
|
2402
2470
|
href = null,
|
|
2403
|
-
target = null
|
|
2471
|
+
target = null,
|
|
2472
|
+
tooltip;
|
|
2404
2473
|
if ($liSpan.length) {
|
|
2405
2474
|
// If a <li><span> tag is specified, use it literally.
|
|
2406
2475
|
title = $liSpan.html();
|
|
@@ -2408,6 +2477,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
2408
2477
|
title = $liA.html();
|
|
2409
2478
|
href = $liA.attr("href");
|
|
2410
2479
|
target = $liA.attr("target");
|
|
2480
|
+
tooltip = $liA.attr("title");
|
|
2411
2481
|
} else {
|
|
2412
2482
|
// If only a <li> tag is specified, use the trimmed string up to
|
|
2413
2483
|
// the next child <ul> tag.
|
|
@@ -2423,6 +2493,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
2423
2493
|
// Parse node options from ID, title and class attributes
|
|
2424
2494
|
var data = {
|
|
2425
2495
|
title: title,
|
|
2496
|
+
tooltip: tooltip,
|
|
2426
2497
|
isFolder: $li.hasClass("folder"),
|
|
2427
2498
|
isLazy: $li.hasClass("lazy"),
|
|
2428
2499
|
expand: $li.hasClass("expanded"),
|
|
@@ -2436,7 +2507,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
2436
2507
|
data.target = target;
|
|
2437
2508
|
}
|
|
2438
2509
|
if ($li.attr("title")) {
|
|
2439
|
-
data.tooltip = $li.attr("title");
|
|
2510
|
+
data.tooltip = $li.attr("title"); // overrides <a title='...'>
|
|
2440
2511
|
}
|
|
2441
2512
|
if ($li.attr("id")) {
|
|
2442
2513
|
data.key = $li.attr("id");
|
|
@@ -2470,8 +2541,8 @@ var DTNodeStatus_Ok = 0;
|
|
|
2470
2541
|
|
|
2471
2542
|
_setDndStatus: function(sourceNode, targetNode, helper, hitMode, accept) {
|
|
2472
2543
|
// hitMode: 'after', 'before', 'over', 'out', 'start', 'stop'
|
|
2473
|
-
var $source = sourceNode ? $(sourceNode.span) : null
|
|
2474
|
-
|
|
2544
|
+
var $source = sourceNode ? $(sourceNode.span) : null,
|
|
2545
|
+
$target = $(targetNode.span);
|
|
2475
2546
|
if (!this.$dndMarker) {
|
|
2476
2547
|
this.$dndMarker = $("<div id='dynatree-drop-marker'></div>")
|
|
2477
2548
|
.hide()
|
|
@@ -2489,7 +2560,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
2489
2560
|
// this.$dndMarker.attr("class", hitMode);
|
|
2490
2561
|
if (hitMode === "after" || hitMode === "before" || hitMode === "over") {
|
|
2491
2562
|
// $source && $source.addClass("dynatree-drag-source");
|
|
2492
|
-
var pos = $target.
|
|
2563
|
+
var pos = $target.offset();
|
|
2493
2564
|
switch (hitMode) {
|
|
2494
2565
|
case "before":
|
|
2495
2566
|
this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-over");
|
|
@@ -2507,7 +2578,18 @@ var DTNodeStatus_Ok = 0;
|
|
|
2507
2578
|
$target.addClass("dynatree-drop-target");
|
|
2508
2579
|
pos.left += 8;
|
|
2509
2580
|
}
|
|
2510
|
-
|
|
2581
|
+
// logMsg("Creating marker: %o", this.$dndMarker);
|
|
2582
|
+
// logMsg(" $target.offset=%o", $target);
|
|
2583
|
+
// logMsg(" pos/$target.offset=%o", pos);
|
|
2584
|
+
// logMsg(" $target.position=%o", $target.position());
|
|
2585
|
+
// logMsg(" $target.offsetParent=%o, ot:%o", $target.offsetParent(), $target.offsetParent().offset());
|
|
2586
|
+
// logMsg(" $(this.divTree).offset=%o", $(this.divTree).offset());
|
|
2587
|
+
// logMsg(" $(this.divTree).parent=%o", $(this.divTree).parent());
|
|
2588
|
+
|
|
2589
|
+
this.$dndMarker.offset({left: pos.left, top: pos.top})
|
|
2590
|
+
.css({
|
|
2591
|
+
"z-index": 1000
|
|
2592
|
+
})
|
|
2511
2593
|
.show();
|
|
2512
2594
|
// helper.addClass("dynatree-drop-hover");
|
|
2513
2595
|
} else {
|
|
@@ -2754,7 +2836,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
2754
2836
|
_create: function() {
|
|
2755
2837
|
var opts = this.options;
|
|
2756
2838
|
if (opts.debugLevel >= 1) {
|
|
2757
|
-
logMsg("Dynatree._create(): version='%s', debugLevel=%o.",
|
|
2839
|
+
logMsg("Dynatree._create(): version='%s', debugLevel=%o.", $.ui.dynatree.version, this.options.debugLevel);
|
|
2758
2840
|
}
|
|
2759
2841
|
// The widget framework supplies this.element and this.options.
|
|
2760
2842
|
this.options.event += ".dynatree"; // namespace event
|
|
@@ -2887,6 +2969,34 @@ var DTNodeStatus_Ok = 0;
|
|
|
2887
2969
|
$.ui.dynatree.getter = "getTree getRoot getActiveNode getSelectedNodes";
|
|
2888
2970
|
}
|
|
2889
2971
|
|
|
2972
|
+
/*******************************************************************************
|
|
2973
|
+
* Tools in ui.dynatree namespace
|
|
2974
|
+
*/
|
|
2975
|
+
$.ui.dynatree.version = "$Version:$";
|
|
2976
|
+
|
|
2977
|
+
/**
|
|
2978
|
+
* Return a DynaTreeNode object for a given DOM element
|
|
2979
|
+
*/
|
|
2980
|
+
$.ui.dynatree.getNode = function(el) {
|
|
2981
|
+
if (el instanceof DynaTreeNode) {
|
|
2982
|
+
return el; // el already was a DynaTreeNode
|
|
2983
|
+
}
|
|
2984
|
+
// TODO: for some reason $el.parents("[dtnode]") does not work (jQuery 1.6.1)
|
|
2985
|
+
// maybe, because dtnode is a property, not an attribute
|
|
2986
|
+
var $el = el.selector === undefined ? $(el) : el,
|
|
2987
|
+
// parent = $el.closest("[dtnode]"),
|
|
2988
|
+
parent = $el.parents("[dtnode]").first(),
|
|
2989
|
+
node;
|
|
2990
|
+
if (typeof parent.prop == "function") {
|
|
2991
|
+
node = parent.prop("dtnode");
|
|
2992
|
+
} else { // pre jQuery 1.6
|
|
2993
|
+
node = parent.attr("dtnode");
|
|
2994
|
+
}
|
|
2995
|
+
return node;
|
|
2996
|
+
}
|
|
2997
|
+
|
|
2998
|
+
/**Return persistence information from cookies.*/
|
|
2999
|
+
$.ui.dynatree.getPersistData = DynaTreeStatus._getTreePersistData;
|
|
2890
3000
|
|
|
2891
3001
|
/*******************************************************************************
|
|
2892
3002
|
* Plugin default options:
|
|
@@ -2929,6 +3039,7 @@ var DTNodeStatus_Ok = 0;
|
|
|
2929
3039
|
onExpand: null, // Callback(flag, dtnode) when a node is expanded/collapsed.
|
|
2930
3040
|
onLazyRead: null, // Callback(dtnode) when a lazy node is expanded for the first time.
|
|
2931
3041
|
onCustomRender: null, // Callback(dtnode) before a node is rendered. Return a HTML string to override.
|
|
3042
|
+
onCreate: null, // Callback(dtnode, nodeSpan) after a node was rendered for the first time.
|
|
2932
3043
|
onRender: null, // Callback(dtnode, nodeSpan) after a node was rendered.
|
|
2933
3044
|
|
|
2934
3045
|
// Drag'n'drop support
|