kosmas58-compass-jquery-plugin 0.1.8
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/MIT-LICENSE +20 -0
- data/README.textile +109 -0
- data/Rakefile +9 -0
- data/lib/handle_js_files.rb +35 -0
- data/lib/jquery.rb +1 -0
- data/lib/jquery/compass_plugin.rb +5 -0
- data/lib/jquery/jqgrid.rb +374 -0
- data/lib/jquery/jrails.rb +427 -0
- data/lib/jquery/rubygems.rake +41 -0
- data/lib/jquery/secret_sauce.rb +10 -0
- data/lib/jquery/secret_sauce/controller/ui_dialog_controls.rb +14 -0
- data/lib/jquery/secret_sauce/controller/ui_grid_controls.rb +18 -0
- data/lib/jquery/secret_sauce/helpers/ui_dialog_helper.rb +6 -0
- data/lib/jquery/secret_sauce/helpers/ui_form_helper.rb +118 -0
- data/lib/jquery/secret_sauce/helpers/ui_grid_helper.rb +219 -0
- data/lib/jquery/secret_sauce/helpers/ui_theme_helper.rb +16 -0
- data/lib/jquery/secret_sauce/model/find_for_grid.rb +45 -0
- data/lib/jquery/version.rb +12 -0
- data/lib/yuicompressor-2.4.2.jar +0 -0
- data/templates/dynatree/jquery.dynatree.js +1894 -0
- data/templates/dynatree/jquery.dynatree.min.js +1 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua.sass +156 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/cbChecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/cbChecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/cbIntermediate.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/cbIntermediate_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/cbUnchecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/cbUnchecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/collapsed.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/collapsed_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/customDoc1.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/customFolder1.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/doc_with_children.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/document.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/empty.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/expanded.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/expanded_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/folder.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/folder_docs.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/folder_images.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/folder_open.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/folder_page.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/ltDoc.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/ltError.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/ltWait.gif +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal.sass +156 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/cbChecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/cbChecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/cbIntermediate.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/cbIntermediate_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/cbUnchecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/cbUnchecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/collapsed.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/collapsed_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/customDoc1.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/customFolder1.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/doc_with_children.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/document.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/edit_add.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/empty.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/expanded.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/expanded_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/folder.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/folder_docs.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/folder_images.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/folder_open.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/folder_page.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/ltDoc.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/ltError.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/ltWait.gif +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista.sass +156 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/cbChecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/cbChecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/cbIntermediate.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/cbIntermediate_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/cbUnchecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/cbUnchecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/collapsed.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/collapsed_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/customDoc1.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/customFolder1.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/doc_with_children.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/document.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/empty.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/expanded.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/expanded_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/folder.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/folder_docs.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/folder_images.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/folder_open.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/folder_page.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/ltDoc.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/ltError.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/ltWait.ani +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/ltWait.gif +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp.sass +158 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/cbChecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/cbChecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/cbIntermediate.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/cbIntermediate_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/cbUnchecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/cbUnchecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/customDoc1.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/customFolder1.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltD_ne.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltD_nes.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltDoc.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltError.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltFld.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltFld_o.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltL_.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltL_ne.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltL_nes.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltL_ns.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltM_ne.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltM_nes.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltP_ne.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltP_nes.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ltWait.gif +0 -0
- data/templates/dynatree/manifest.rb +103 -0
- data/templates/jqgrid/config/initializers/jqgrid.rb +3 -0
- data/templates/jqgrid/i18n/jqgrid/locale-bg.js +128 -0
- data/templates/jqgrid/i18n/jqgrid/locale-bg.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.js +128 -0
- data/templates/jqgrid/i18n/jqgrid/locale-bg1251.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-cat.js +124 -0
- data/templates/jqgrid/i18n/jqgrid/locale-cat.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-cs.js +123 -0
- data/templates/jqgrid/i18n/jqgrid/locale-cs.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-de.js +124 -0
- data/templates/jqgrid/i18n/jqgrid/locale-de.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-dk.js +124 -0
- data/templates/jqgrid/i18n/jqgrid/locale-dk.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-el.js +122 -0
- data/templates/jqgrid/i18n/jqgrid/locale-el.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-en.js +123 -0
- data/templates/jqgrid/i18n/jqgrid/locale-en.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fa.js +121 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fa.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fi.js +124 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fi.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fr.js +122 -0
- data/templates/jqgrid/i18n/jqgrid/locale-fr.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-is.js +122 -0
- data/templates/jqgrid/i18n/jqgrid/locale-is.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-it.js +122 -0
- data/templates/jqgrid/i18n/jqgrid/locale-it.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-jp.js +123 -0
- data/templates/jqgrid/i18n/jqgrid/locale-jp.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-no.js +116 -0
- data/templates/jqgrid/i18n/jqgrid/locale-no.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pl.js +123 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pl.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.js +123 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pt-br.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pt.js +121 -0
- data/templates/jqgrid/i18n/jqgrid/locale-pt.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ru.js +123 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ru.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-sp.js +124 -0
- data/templates/jqgrid/i18n/jqgrid/locale-sp.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-sv.js +112 -0
- data/templates/jqgrid/i18n/jqgrid/locale-sv.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-tr.js +122 -0
- data/templates/jqgrid/i18n/jqgrid/locale-tr.min.js +1 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ua.js +123 -0
- data/templates/jqgrid/i18n/jqgrid/locale-ua.min.js +1 -0
- data/templates/jqgrid/jquery.jqGrid.js +8415 -0
- data/templates/jqgrid/jquery.jqGrid.min.js +1 -0
- data/templates/jqgrid/jquery.ui/jqGrid.sass +541 -0
- data/templates/jqgrid/manifest.rb +53 -0
- data/templates/jrails/config/initializers/jrails.rb +25 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ar.js +20 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ar.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-bg.js +20 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-bg.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ca.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ca.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-cs.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-cs.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-da.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-da.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-de.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-de.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-el.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-el.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-eo.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-eo.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-es.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-es.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-fa.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-fa.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-fi.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-fi.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-fr.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-fr.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-he.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-he.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-hr.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-hr.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-hu.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-hu.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-hy.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-hy.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-id.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-id.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-is.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-is.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-it.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-it.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ja.js +20 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ja.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ko.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ko.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-lt.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-lt.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-lv.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-lv.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ms.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ms.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-nl.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-nl.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-no.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-no.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-pl.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-pl.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-pt-BR.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-pt-BR.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ro.js +22 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ro.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ru.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-ru.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sk.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sk.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sl.js +20 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sl.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sq.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sq.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sr-SR.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sr-SR.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sr.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sr.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sv.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-sv.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-th.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-th.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-tr.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-tr.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-uk.js +25 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-uk.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-zh-CN.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-zh-CN.min.js +1 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-zh-TW.js +19 -0
- data/templates/jrails/i18n/jquery.ui/datepicker-zh-TW.min.js +1 -0
- data/templates/jrails/jquery.js +7627 -0
- data/templates/jrails/jquery.min.js +19 -0
- data/templates/jrails/jquery.pngFix.js +11 -0
- data/templates/jrails/jquery.pngFix.min.js +1 -0
- data/templates/jrails/jquery.ui.js +18367 -0
- data/templates/jrails/jquery.ui.min.js +1 -0
- data/templates/jrails/jquery.ui/_theme.sass +1462 -0
- data/templates/jrails/jquery.ui/base.sass +85 -0
- data/templates/jrails/jquery.ui/base/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-icons_222222_256x240.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-icons_2e83ff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-icons_454545_256x240.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-icons_888888_256x240.png +0 -0
- data/templates/jrails/jquery.ui/base/ui-icons_cd0a0a_256x240.png +0 -0
- data/templates/jrails/jquery.ui/black-tie.sass +85 -0
- data/templates/jrails/jquery.ui/black-tie/ui-bg_diagonals-thick_8_333333_40x40.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-bg_flat_65_ffffff_40x100.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-bg_glass_40_111111_1x400.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-bg_glass_55_1c1c1c_1x400.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-bg_highlight-hard_100_f9f9f9_1x100.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-bg_highlight-hard_40_aaaaaa_1x100.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-bg_highlight-soft_50_aaaaaa_1x100.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-bg_inset-hard_45_cd0a0a_1x100.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-bg_inset-hard_55_ffeb80_1x100.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-icons_222222_256x240.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-icons_4ca300_256x240.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-icons_bbbbbb_256x240.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-icons_ededed_256x240.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-icons_ffcf29_256x240.png +0 -0
- data/templates/jrails/jquery.ui/black-tie/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/blitzer.sass +85 -0
- data/templates/jrails/jquery.ui/blitzer/ui-bg_diagonals-thick_75_f3d8d8_40x40.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-bg_dots-small_65_a6a6a6_2x2.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-bg_flat_0_333333_40x100.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-bg_flat_65_ffffff_40x100.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-bg_glass_55_fbf8ee_1x400.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-bg_highlight-hard_100_eeeeee_1x100.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-bg_highlight-hard_100_f6f6f6_1x100.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-bg_highlight-soft_15_cc0000_1x100.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-icons_004276_256x240.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-icons_cc0000_256x240.png +0 -0
- data/templates/jrails/jquery.ui/blitzer/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/cupertino.sass +85 -0
- data/templates/jrails/jquery.ui/cupertino/ui-bg_diagonals-thick_90_eeeeee_40x40.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-bg_flat_15_cd0a0a_40x100.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-bg_glass_50_3baae3_1x400.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-bg_highlight-hard_100_f2f5f7_1x100.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-bg_highlight-hard_70_000000_1x100.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-bg_highlight-soft_100_deedf7_1x100.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-bg_highlight-soft_25_ffef8f_1x100.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-icons_2694e8_256x240.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-icons_2e83ff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-icons_3d80b3_256x240.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-icons_72a7cf_256x240.png +0 -0
- data/templates/jrails/jquery.ui/cupertino/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive.sass +85 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-bg_flat_30_cccccc_40x100.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-bg_glass_40_ffc73d_1x400.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-bg_highlight-hard_20_0972a5_1x100.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-bg_highlight-soft_33_003147_1x100.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-bg_highlight-soft_35_222222_1x100.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-bg_highlight-soft_44_444444_1x100.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-bg_loop_25_000000_21x21.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-icons_222222_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-icons_4b8e0b_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-icons_a83300_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-icons_cccccc_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dark-hive/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv.sass +85 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_diagonals-thick_15_0b3e6f_40x40.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_dots-medium_30_0b58a2_4x4.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_dots-small_20_333333_2x2.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_dots-small_30_a32d00_2x2.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_dots-small_40_00498f_2x2.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_flat_40_292929_40x100.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-bg_gloss-wave_20_111111_500x100.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-icons_00498f_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-icons_98d2fb_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-icons_9ccdfc_256x240.png +0 -0
- data/templates/jrails/jquery.ui/dot-luv/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/eggplant.sass +85 -0
- data/templates/jrails/jquery.ui/eggplant/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-bg_flat_55_994d53_40x100.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-bg_flat_55_fafafa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-bg_gloss-wave_30_3d3644_500x100.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-bg_highlight-soft_100_dcd9de_1x100.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-bg_highlight-soft_100_eae6ea_1x100.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-bg_highlight-soft_25_30273a_1x100.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-bg_highlight-soft_45_5f5964_1x100.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-icons_454545_256x240.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-icons_734d99_256x240.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-icons_8d78a5_256x240.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-icons_a8a3ae_256x240.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-icons_ebccce_256x240.png +0 -0
- data/templates/jrails/jquery.ui/eggplant/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike.sass +85 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_diagonals-small_25_c5ddfc_40x40.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_diagonals-thick_20_e69700_40x40.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_diagonals-thick_22_1484e6_40x40.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_diagonals-thick_26_2293f7_40x40.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_flat_0_e69700_40x100.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_flat_0_e6b900_40x100.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_highlight-soft_100_f9f9f9_1x100.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-bg_inset-hard_100_eeeeee_1x100.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-icons_0a82eb_256x240.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-icons_0b54d5_256x240.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-icons_5fa5e3_256x240.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-icons_fcdd4a_256x240.png +0 -0
- data/templates/jrails/jquery.ui/excite-bike/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/flick.sass +85 -0
- data/templates/jrails/jquery.ui/flick/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-bg_flat_55_ffffff_40x100.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-icons_0073ea_256x240.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-icons_454545_256x240.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-icons_666666_256x240.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-icons_ff0084_256x240.png +0 -0
- data/templates/jrails/jquery.ui/flick/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks.sass +85 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_diagonals-small_40_db4865_40x40.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_diagonals-small_50_93c3cd_40x40.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_diagonals-small_50_ff3853_40x40.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_diagonals-small_75_ccd232_40x40.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_dots-medium_80_ffff38_4x4.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_dots-small_35_35414f_2x2.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_flat_75_ba9217_40x100.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-bg_white-lines_85_f7f7ba_40x100.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-icons_454545_256x240.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-icons_88a206_256x240.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-icons_c02669_256x240.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-icons_e1e463_256x240.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-icons_ffeb33_256x240.png +0 -0
- data/templates/jrails/jquery.ui/hot-sneaks/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/humanity.sass +85 -0
- data/templates/jrails/jquery.ui/humanity/ui-bg_flat_75_aaaaaa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-bg_glass_100_f5f0e5_1x400.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-bg_glass_25_cb842e_1x400.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-bg_glass_70_ede4d4_1x400.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-bg_highlight-hard_100_f4f0ec_1x100.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-bg_highlight-hard_65_fee4bd_1x100.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-bg_highlight-hard_75_f5f5b5_1x100.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-bg_inset-soft_100_f4f0ec_1x100.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-icons_c47a23_256x240.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-icons_cb672b_256x240.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-icons_f08000_256x240.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-icons_f35f07_256x240.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-icons_ff7519_256x240.png +0 -0
- data/templates/jrails/jquery.ui/humanity/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/le-frog.sass +85 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_diagonals-small_0_aaaaaa_40x40.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_diagonals-thick_15_444444_40x40.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_diagonals-thick_95_ffdc2e_40x40.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_glass_55_fbf5d0_1x400.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_highlight-hard_30_285c00_1x100.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_highlight-soft_33_3a8104_1x100.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_highlight-soft_50_4eb305_1x100.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_highlight-soft_60_4ca20b_1x100.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-bg_inset-soft_10_285c00_1x100.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-icons_4eb305_256x240.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-icons_72b42d_256x240.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-icons_cd0a0a_256x240.png +0 -0
- data/templates/jrails/jquery.ui/le-frog/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc.sass +85 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-bg_glass_15_5f391b_1x400.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-bg_gloss-wave_20_1c160d_500x100.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-bg_gloss-wave_25_453326_500x100.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-bg_gloss-wave_30_44372c_500x100.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-bg_highlight-soft_20_201913_1x100.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-bg_highlight-soft_20_619226_1x100.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-bg_inset-soft_10_201913_1x100.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-icons_222222_256x240.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-icons_9bcc60_256x240.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-icons_add978_256x240.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-icons_e3ddc9_256x240.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-icons_f1fd86_256x240.png +0 -0
- data/templates/jrails/jquery.ui/mint-choc/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/overcast.sass +85 -0
- data/templates/jrails/jquery.ui/overcast/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-bg_flat_55_c0402a_40x100.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-bg_flat_55_eeeeee_40x100.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-bg_glass_100_f8f8f8_1x400.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-bg_glass_35_dddddd_1x400.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-bg_glass_60_eeeeee_1x400.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-bg_inset-hard_75_999999_1x100.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-bg_inset-soft_50_c9c9c9_1x100.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-icons_3383bb_256x240.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-icons_454545_256x240.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-icons_70b2e1_256x240.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-icons_999999_256x240.png +0 -0
- data/templates/jrails/jquery.ui/overcast/ui-icons_fbc856_256x240.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder.sass +85 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_diagonal-maze_20_6e4f1c_10x10.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_diagonal-maze_40_000000_10x10.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_fine-grain_10_eceadf_60x60.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_fine-grain_10_f8f7f6_60x60.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_fine-grain_15_eceadf_60x60.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_fine-grain_15_f7f3de_60x60.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_fine-grain_15_ffffff_60x60.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_fine-grain_65_654b24_60x60.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-bg_fine-grain_68_b83400_60x60.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-icons_222222_256x240.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-icons_3572ac_256x240.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-icons_8c291d_256x240.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-icons_b83400_256x240.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-icons_fbdb93_256x240.png +0 -0
- data/templates/jrails/jquery.ui/pepper-grinder/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/redmond.sass +85 -0
- data/templates/jrails/jquery.ui/redmond/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-icons_217bc0_256x240.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-icons_2e83ff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-icons_469bdd_256x240.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-icons_6da8d5_256x240.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-icons_cd0a0a_256x240.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-icons_d8e7f3_256x240.png +0 -0
- data/templates/jrails/jquery.ui/redmond/ui-icons_f9bd01_256x240.png +0 -0
- data/templates/jrails/jquery.ui/smoothness.sass +85 -0
- data/templates/jrails/jquery.ui/smoothness/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-icons_222222_256x240.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-icons_2e83ff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-icons_454545_256x240.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-icons_888888_256x240.png +0 -0
- data/templates/jrails/jquery.ui/smoothness/ui-icons_cd0a0a_256x240.png +0 -0
- data/templates/jrails/jquery.ui/south-street.sass +85 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_glass_55_fcf0ba_1x400.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_gloss-wave_100_ece8da_500x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-hard_100_f5f3e5_1x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-hard_100_fafaf4_1x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-hard_15_459e00_1x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-hard_95_cccccc_1x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-soft_25_67b021_1x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_highlight-soft_95_ffedad_1x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-bg_inset-soft_15_2b2922_1x100.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-icons_808080_256x240.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-icons_847e71_256x240.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-icons_8DC262_256x240.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-icons_cd0a0a_256x240.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-icons_eeeeee_256x240.png +0 -0
- data/templates/jrails/jquery.ui/south-street/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny.sass +85 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_diagonals-medium_20_d34d17_40x40.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_flat_30_cccccc_40x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_gloss-wave_45_817865_500x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_gloss-wave_60_fece2f_500x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_gloss-wave_70_ffdd57_500x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_gloss-wave_90_fff9e5_500x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_highlight-soft_100_feeebd_1x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-bg_inset-soft_30_ffffff_1x100.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_3d3d3d_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_bd7b00_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_d19405_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_eb990f_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_ed9f26_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_fadc7a_256x240.png +0 -0
- data/templates/jrails/jquery.ui/sunny/ui-icons_ffe180_256x240.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse.sass +85 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_diamond_10_4f4221_10x8.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_diamond_20_372806_10x8.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_diamond_25_675423_10x8.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_diamond_25_d5ac5d_10x8.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_diamond_8_261803_10x8.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_diamond_8_443113_10x8.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_flat_75_ddd4b0_40x100.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-bg_highlight-hard_65_fee4bd_1x100.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-icons_070603_256x240.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-icons_e8e2b5_256x240.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-icons_e9cd86_256x240.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-icons_efec9f_256x240.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-icons_f2ec64_256x240.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-icons_f9f2bd_256x240.png +0 -0
- data/templates/jrails/jquery.ui/swanky-purse/ui-icons_ff7519_256x240.png +0 -0
- data/templates/jrails/jquery.ui/trontastic.sass +85 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_diagonals-small_50_262626_40x40.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_flat_0_303030_40x100.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_flat_0_4c4c4c_40x100.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_glass_40_0a0a0a_1x400.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_glass_55_f1fbe5_1x400.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_glass_60_000000_1x400.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_gloss-wave_55_000000_500x100.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_gloss-wave_85_9fda58_500x100.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-bg_gloss-wave_95_f6ecd5_500x100.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-icons_000000_256x240.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-icons_1f1f1f_256x240.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-icons_9fda58_256x240.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-icons_b8ec79_256x240.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-icons_cd0a0a_256x240.png +0 -0
- data/templates/jrails/jquery.ui/trontastic/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness.sass +85 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-bg_flat_30_cccccc_40x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-bg_flat_50_5c5c5c_40x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-bg_glass_20_555555_1x400.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-bg_glass_40_0078a3_1x400.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-bg_glass_40_ffc73d_1x400.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-bg_gloss-wave_25_333333_500x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-bg_highlight-soft_80_eeeeee_1x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-bg_inset-soft_25_000000_1x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-bg_inset-soft_30_f58400_1x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-icons_222222_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-icons_4b8e0b_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-icons_a83300_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-icons_cccccc_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-darkness/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness.sass +85 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_flat_10_000000_40x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-icons_222222_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-icons_228ef1_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-icons_ef8c08_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-icons_ffd27a_256x240.png +0 -0
- data/templates/jrails/jquery.ui/ui-lightness/ui-icons_ffffff_256x240.png +0 -0
- data/templates/jrails/jquery.ui/vader.sass +85 -0
- data/templates/jrails/jquery.ui/vader/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-bg_gloss-wave_16_121212_500x100.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-bg_highlight-hard_15_888888_1x100.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-bg_highlight-hard_55_555555_1x100.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-bg_highlight-soft_35_adadad_1x100.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-bg_highlight-soft_60_dddddd_1x100.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-bg_inset-soft_15_121212_1x100.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-icons_666666_256x240.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-icons_aaaaaa_256x240.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-icons_bbbbbb_256x240.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-icons_c98000_256x240.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-icons_cccccc_256x240.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-icons_cd0a0a_256x240.png +0 -0
- data/templates/jrails/jquery.ui/vader/ui-icons_f29a00_256x240.png +0 -0
- data/templates/jrails/jrails.js +197 -0
- data/templates/jrails/jrails.min.js +1 -0
- data/templates/jrails/manifest.rb +119 -0
- data/templates/secret_sauce/app/views/ui/_ui_form_error_messages.html.haml +6 -0
- data/templates/secret_sauce/app/views/ui/_ui_grid_for_without_block.html.erb +139 -0
- data/templates/secret_sauce/app/views/ui/_ui_static_dialog.html.haml +6 -0
- data/templates/secret_sauce/config/initializers/secret_sauce.rb +8 -0
- data/templates/secret_sauce/jquery.ui/secret_sauce.sass +32 -0
- data/templates/secret_sauce/manifest.rb +10 -0
- data/templates/secret_sauce/secret_sauce.js +12 -0
- data/templates/secret_sauce/secret_sauce.min.js +1 -0
- metadata +750 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
module CompassJqueryPlugin#:nodoc:
|
2
|
+
|
3
|
+
class VERSION #:nodoc:
|
4
|
+
MAJOR = 0
|
5
|
+
MINOR = 1
|
6
|
+
TINY = 8
|
7
|
+
PATCH = nil # Set to nil for official release
|
8
|
+
|
9
|
+
STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
|
10
|
+
STABLE_STRING = [MAJOR, MINOR, TINY].join('.')
|
11
|
+
end
|
12
|
+
end
|
Binary file
|
@@ -0,0 +1,1894 @@
|
|
1
|
+
/*************************************************************************
|
2
|
+
jquery.dynatree.js
|
3
|
+
Dynamic tree view control, with support for lazy loading of branches.
|
4
|
+
|
5
|
+
Copyright (c) 2008-2009 Martin Wendt (http://wwWendt.de)
|
6
|
+
Licensed under the MIT License (MIT-License.txt)
|
7
|
+
|
8
|
+
A current version and some documentation is available at
|
9
|
+
http://dynatree.googlecode.com/
|
10
|
+
|
11
|
+
Let me know, if you find bugs or improvements (martin at domain wwWendt.de).
|
12
|
+
|
13
|
+
$Version: 0.5.0$
|
14
|
+
$Revision: 261, 2009-07-09 17:33:58$
|
15
|
+
|
16
|
+
@depends: jquery.js
|
17
|
+
@depends: ui.core.js
|
18
|
+
@depends: jquery.cookie.js
|
19
|
+
*************************************************************************/
|
20
|
+
|
21
|
+
|
22
|
+
/*************************************************************************
|
23
|
+
* Debug functions
|
24
|
+
*/
|
25
|
+
|
26
|
+
var _canLog = true;
|
27
|
+
|
28
|
+
function _log(mode, msg) {
|
29
|
+
/**
|
30
|
+
* Usage: logMsg("%o was toggled", this);
|
31
|
+
*/
|
32
|
+
if( !_canLog )
|
33
|
+
return;
|
34
|
+
// Remove first argument
|
35
|
+
var args = Array.prototype.slice.apply(arguments, [1]);
|
36
|
+
// Prepend timestamp
|
37
|
+
var dt = new Date();
|
38
|
+
var tag = dt.getHours()+":"+dt.getMinutes()+":"+dt.getSeconds()+"."+dt.getMilliseconds();
|
39
|
+
args[0] = tag + " - " + args[0];
|
40
|
+
|
41
|
+
try {
|
42
|
+
switch( mode ) {
|
43
|
+
case "info":
|
44
|
+
window.console.info.apply(window.console, args);
|
45
|
+
break;
|
46
|
+
case "warn":
|
47
|
+
window.console.warn.apply(window.console, args);
|
48
|
+
break;
|
49
|
+
default:
|
50
|
+
window.console.log.apply(window.console, args);
|
51
|
+
}
|
52
|
+
} catch(e) {
|
53
|
+
if( !window.console )
|
54
|
+
_canLog = false; // Permanently disable, when logging is not supported by the browser
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
function logMsg(msg) {
|
59
|
+
Array.prototype.unshift.apply(arguments, ["debug"]);
|
60
|
+
_log.apply(this, arguments);
|
61
|
+
}
|
62
|
+
|
63
|
+
|
64
|
+
// Forward declaration
|
65
|
+
var getDynaTreePersistData = undefined;
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
/*************************************************************************
|
70
|
+
* Constants
|
71
|
+
*/
|
72
|
+
var DTNodeStatus_Error = -1;
|
73
|
+
var DTNodeStatus_Loading = 1;
|
74
|
+
var DTNodeStatus_Ok = 0;
|
75
|
+
|
76
|
+
|
77
|
+
// Start of local namespace
|
78
|
+
;(function($) {
|
79
|
+
|
80
|
+
/*************************************************************************
|
81
|
+
* Common tool functions.
|
82
|
+
*/
|
83
|
+
|
84
|
+
var Class = {
|
85
|
+
create: function() {
|
86
|
+
return function() {
|
87
|
+
this.initialize.apply(this, arguments);
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
/*************************************************************************
|
93
|
+
* Class DynaTreeNode
|
94
|
+
*/
|
95
|
+
var DynaTreeNode = Class.create();
|
96
|
+
|
97
|
+
DynaTreeNode.prototype = {
|
98
|
+
initialize: function(parent, tree, data) {
|
99
|
+
/**
|
100
|
+
* @constructor
|
101
|
+
*/
|
102
|
+
this.parent = parent;
|
103
|
+
this.tree = tree;
|
104
|
+
if ( typeof data == "string" )
|
105
|
+
data = { title: data };
|
106
|
+
if( data.key == undefined )
|
107
|
+
data.key = "_" + tree._nodeCount++;
|
108
|
+
this.data = $.extend({}, $.ui.dynatree.nodedatadefaults, data);
|
109
|
+
this.div = null; // not yet created
|
110
|
+
this.span = null; // not yet created
|
111
|
+
this.childList = null; // no subnodes yet
|
112
|
+
this.isRead = false; // Lazy content not yet read
|
113
|
+
this.isLoading = false; // Lazy content is being loaded
|
114
|
+
this.hasSubSel = false;
|
115
|
+
},
|
116
|
+
|
117
|
+
toString: function() {
|
118
|
+
return "dtnode<" + this.data.key + ">: '" + this.data.title + "'";
|
119
|
+
},
|
120
|
+
|
121
|
+
toDict: function(recursive, callback) {
|
122
|
+
var dict = $.extend({}, this.data);
|
123
|
+
dict.activate = ( this.tree.activeNode === this );
|
124
|
+
dict.focus = ( this.tree.focusNode === this );
|
125
|
+
dict.expand = this.bExpanded;
|
126
|
+
dict.select = this.bSelected;
|
127
|
+
if( callback )
|
128
|
+
callback(dict);
|
129
|
+
if( recursive && this.childList ) {
|
130
|
+
dict.children = [];
|
131
|
+
for(var i=0; i<this.childList.length; i++ )
|
132
|
+
dict.children.push(this.childList[i].toDict(true, callback));
|
133
|
+
} else {
|
134
|
+
delete dict.children;
|
135
|
+
}
|
136
|
+
return dict;
|
137
|
+
},
|
138
|
+
|
139
|
+
_getInnerHtml: function() {
|
140
|
+
var opts = this.tree.options;
|
141
|
+
var cache = this.tree.cache;
|
142
|
+
// parent connectors
|
143
|
+
var rootParent = opts.rootVisible ? null : this.tree.tnRoot;
|
144
|
+
var bHideFirstExpander = (opts.rootVisible && opts.minExpandLevel>0) || opts.minExpandLevel>1;
|
145
|
+
var bHideFirstConnector = opts.rootVisible || opts.minExpandLevel>0;
|
146
|
+
|
147
|
+
var res = "";
|
148
|
+
var p = this.parent;
|
149
|
+
while( p ) {
|
150
|
+
// Suppress first connector column, if visible top level is always expanded
|
151
|
+
if ( bHideFirstConnector && p==rootParent )
|
152
|
+
break;
|
153
|
+
res = ( p.isLastSibling() ? cache.tagEmpty : cache.tagVline) + res;
|
154
|
+
p = p.parent;
|
155
|
+
}
|
156
|
+
|
157
|
+
// connector (expanded, expandable or simple)
|
158
|
+
if( bHideFirstExpander && this.parent==rootParent ) {
|
159
|
+
// skip connector
|
160
|
+
} else if ( this.childList || this.data.isLazy ) {
|
161
|
+
res += cache.tagExpander;
|
162
|
+
} else {
|
163
|
+
res += cache.tagConnector;
|
164
|
+
}
|
165
|
+
|
166
|
+
// Checkbox mode
|
167
|
+
if( opts.checkbox && this.data.hideCheckbox!=true && !this.data.isStatusNode ) {
|
168
|
+
res += cache.tagCheckbox;
|
169
|
+
}
|
170
|
+
|
171
|
+
// folder or doctype icon
|
172
|
+
if ( this.data.icon ) {
|
173
|
+
res += "<img src='" + opts.imagePath + this.data.icon + "' alt='' />";
|
174
|
+
} else if ( this.data.icon == false ) {
|
175
|
+
// icon == false means 'no icon'
|
176
|
+
} else {
|
177
|
+
// icon == null means 'default icon'
|
178
|
+
res += cache.tagNodeIcon;
|
179
|
+
}
|
180
|
+
|
181
|
+
// node name
|
182
|
+
var tooltip = ( this.data && typeof this.data.tooltip == "string" ) ? " title='" + this.data.tooltip + "'" : "";
|
183
|
+
res += "<a href='#' class='" + opts.classNames.title + "'" + tooltip + ">" + this.data.title + "</a>";
|
184
|
+
return res;
|
185
|
+
},
|
186
|
+
|
187
|
+
render: function(bDeep, bHidden) {
|
188
|
+
/**
|
189
|
+
* Create HTML markup for this node.
|
190
|
+
*
|
191
|
+
* <div> // This div contains the node's span and list of child div's.
|
192
|
+
* <span id='key'>S S S A</span> // Span contains graphic spans and title <a> tag
|
193
|
+
* <div>child1</div>
|
194
|
+
* <div>child2</div>
|
195
|
+
* </div>
|
196
|
+
*/
|
197
|
+
// this.tree.logDebug("%o.render()", this);
|
198
|
+
// ---
|
199
|
+
if( ! this.div ) {
|
200
|
+
this.span = document.createElement("span");
|
201
|
+
this.span.dtnode = this;
|
202
|
+
if( this.data.key )
|
203
|
+
this.span.id = this.tree.options.idPrefix + this.data.key;
|
204
|
+
|
205
|
+
this.div = document.createElement("div");
|
206
|
+
this.div.appendChild(this.span);
|
207
|
+
if ( this.parent )
|
208
|
+
this.parent.div.appendChild(this.div);
|
209
|
+
|
210
|
+
if( this.parent==null && !this.tree.options.rootVisible )
|
211
|
+
this.span.style.display = "none";
|
212
|
+
}
|
213
|
+
// set node connector images, links and text
|
214
|
+
this.span.innerHTML = this._getInnerHtml();
|
215
|
+
|
216
|
+
// hide this node, if parent is collapsed
|
217
|
+
this.div.style.display = ( this.parent==null || this.parent.bExpanded ? "" : "none");
|
218
|
+
|
219
|
+
// Set classes for current status
|
220
|
+
var opts = this.tree.options;
|
221
|
+
var cn = opts.classNames;
|
222
|
+
var isLastSib = this.isLastSibling();
|
223
|
+
var cnList = [];
|
224
|
+
cnList.push( ( this.data.isFolder ) ? cn.folder : cn.document );
|
225
|
+
if( this.bExpanded )
|
226
|
+
cnList.push(cn.expanded);
|
227
|
+
if( this.data.isLazy && !this.isRead )
|
228
|
+
cnList.push(cn.lazy);
|
229
|
+
if( isLastSib )
|
230
|
+
cnList.push(cn.lastsib);
|
231
|
+
if( this.bSelected )
|
232
|
+
cnList.push(cn.selected);
|
233
|
+
if( this.hasSubSel )
|
234
|
+
cnList.push(cn.partsel);
|
235
|
+
if( this.tree.activeNode === this )
|
236
|
+
cnList.push(cn.active);
|
237
|
+
if( this.data.addClass )
|
238
|
+
cnList.push(this.data.addClass);
|
239
|
+
// IE6 doesn't correctly evaluate multiple class names,
|
240
|
+
// so we create combined class names that can be used in the CSS
|
241
|
+
cnList.push(cn.combinedExpanderPrefix
|
242
|
+
+ (this.bExpanded ? "e" : "c")
|
243
|
+
+ (this.data.isLazy && !this.isRead ? "d" : "")
|
244
|
+
+ (isLastSib ? "l" : "")
|
245
|
+
);
|
246
|
+
cnList.push(cn.combinedIconPrefix
|
247
|
+
+ (this.bExpanded ? "e" : "c")
|
248
|
+
+ (this.data.isFolder ? "f" : "")
|
249
|
+
);
|
250
|
+
this.span.className = cnList.join(" ");
|
251
|
+
|
252
|
+
if( bDeep && this.childList && (bHidden || this.bExpanded) ) {
|
253
|
+
for(var i=0; i<this.childList.length; i++) {
|
254
|
+
this.childList[i].render(bDeep, bHidden)
|
255
|
+
}
|
256
|
+
}
|
257
|
+
},
|
258
|
+
|
259
|
+
hasChildren: function() {
|
260
|
+
return this.childList != null;
|
261
|
+
},
|
262
|
+
|
263
|
+
isLastSibling: function() {
|
264
|
+
var p = this.parent;
|
265
|
+
if ( !p ) return true;
|
266
|
+
return p.childList[p.childList.length-1] === this;
|
267
|
+
},
|
268
|
+
|
269
|
+
prevSibling: function() {
|
270
|
+
if( !this.parent ) return null;
|
271
|
+
var ac = this.parent.childList;
|
272
|
+
for(var i=1; i<ac.length; i++) // start with 1, so prev(first) = null
|
273
|
+
if( ac[i] === this )
|
274
|
+
return ac[i-1];
|
275
|
+
return null;
|
276
|
+
},
|
277
|
+
|
278
|
+
nextSibling: function() {
|
279
|
+
if( !this.parent ) return null;
|
280
|
+
var ac = this.parent.childList;
|
281
|
+
for(var i=0; i<ac.length-1; i++) // up to length-2, so next(last) = null
|
282
|
+
if( ac[i] === this )
|
283
|
+
return ac[i+1];
|
284
|
+
return null;
|
285
|
+
},
|
286
|
+
|
287
|
+
_setStatusNode: function(data) {
|
288
|
+
// Create, modify or remove the status child node (pass 'null', to remove it).
|
289
|
+
var firstChild = ( this.childList ? this.childList[0] : null );
|
290
|
+
if( !data ) {
|
291
|
+
if ( firstChild ) {
|
292
|
+
this.div.removeChild(firstChild.div);
|
293
|
+
if( this.childList.length == 1 )
|
294
|
+
this.childList = null;
|
295
|
+
else
|
296
|
+
this.childList.shift();
|
297
|
+
}
|
298
|
+
} else if ( firstChild ) {
|
299
|
+
data.isStatusNode = true;
|
300
|
+
firstChild.data = data;
|
301
|
+
firstChild.render(false, false);
|
302
|
+
} else {
|
303
|
+
data.isStatusNode = true;
|
304
|
+
firstChild = this.addChild(data);
|
305
|
+
}
|
306
|
+
},
|
307
|
+
|
308
|
+
setLazyNodeStatus: function(lts) {
|
309
|
+
switch( lts ) {
|
310
|
+
case DTNodeStatus_Ok:
|
311
|
+
this._setStatusNode(null);
|
312
|
+
this.isRead = true;
|
313
|
+
this.isLoading = false;
|
314
|
+
this.render(false, false);
|
315
|
+
if( this.tree.options.autoFocus ) {
|
316
|
+
if( this === this.tree.tnRoot && !this.tree.options.rootVisible && this.childList ) {
|
317
|
+
// special case: using ajaxInit
|
318
|
+
this.childList[0].focus();
|
319
|
+
} else {
|
320
|
+
this.focus();
|
321
|
+
}
|
322
|
+
}
|
323
|
+
break;
|
324
|
+
case DTNodeStatus_Loading:
|
325
|
+
this.isLoading = true;
|
326
|
+
this._setStatusNode({
|
327
|
+
title: this.tree.options.strings.loading,
|
328
|
+
addClass: this.tree.options.classNames.nodeWait
|
329
|
+
});
|
330
|
+
break;
|
331
|
+
case DTNodeStatus_Error:
|
332
|
+
this.isLoading = false;
|
333
|
+
this._setStatusNode({
|
334
|
+
title: this.tree.options.strings.loadError,
|
335
|
+
addClass: this.tree.options.classNames.nodeError
|
336
|
+
});
|
337
|
+
break;
|
338
|
+
default:
|
339
|
+
throw "Bad LazyNodeStatus: '" + lts + "'.";
|
340
|
+
}
|
341
|
+
},
|
342
|
+
|
343
|
+
_parentList: function(includeRoot, includeSelf) {
|
344
|
+
var l = [];
|
345
|
+
var dtn = includeSelf ? this : this.parent;
|
346
|
+
while( dtn ) {
|
347
|
+
if( includeRoot || dtn.parent )
|
348
|
+
l.unshift(dtn);
|
349
|
+
dtn = dtn.parent;
|
350
|
+
};
|
351
|
+
return l;
|
352
|
+
},
|
353
|
+
|
354
|
+
getLevel: function() {
|
355
|
+
var level = 0;
|
356
|
+
var dtn = this.parent;
|
357
|
+
while( dtn ) {
|
358
|
+
level++;
|
359
|
+
dtn = dtn.parent;
|
360
|
+
};
|
361
|
+
return level;
|
362
|
+
},
|
363
|
+
|
364
|
+
_getTypeForOuterNodeEvent: function(event) {
|
365
|
+
/** Return the inner node span (title, checkbox or expander) if
|
366
|
+
* event.target points to the outer span.
|
367
|
+
* This function should fix issue #93:
|
368
|
+
* FF2 ignores empty spans, when generating events (returning the parent instead).
|
369
|
+
*/
|
370
|
+
var cns = this.tree.options.classNames;
|
371
|
+
var target = event.target;
|
372
|
+
// Only process clicks on an outer node span (probably due to a FF2 event handling bug)
|
373
|
+
if( target.className.indexOf(cns.folder)<0
|
374
|
+
&& target.className.indexOf(cns.document)<0 ) {
|
375
|
+
return null
|
376
|
+
}
|
377
|
+
// Event coordinates, relative to outer node span:
|
378
|
+
var eventX = event.pageX - target.offsetLeft;
|
379
|
+
var eventY = event.pageY - target.offsetTop;
|
380
|
+
// alert ("click at " + eventX + ", " + eventY);
|
381
|
+
|
382
|
+
for(var i=0; i<target.childNodes.length; i++) {
|
383
|
+
var cn = target.childNodes[i];
|
384
|
+
var x = cn.offsetLeft - target.offsetLeft;
|
385
|
+
var y = cn.offsetTop - target.offsetTop;
|
386
|
+
var nx = cn.clientWidth, ny = cn.clientHeight;
|
387
|
+
// alert (cn.className + ": " + x + ", " + y + ", s:" + nx + ", " + ny);
|
388
|
+
if( eventX>=x && eventX<=(x+nx) && eventY>=y && eventY<=(y+ny) ) {
|
389
|
+
// alert("HIT "+ cn.className);
|
390
|
+
if( cn.className==cns.title )
|
391
|
+
return "title";
|
392
|
+
else if( cn.className==cns.expander )
|
393
|
+
return "expander";
|
394
|
+
else if( cn.className==cns.checkbox )
|
395
|
+
return "checkbox";
|
396
|
+
else if( cn.className==cns.nodeIcon )
|
397
|
+
return "icon";
|
398
|
+
}
|
399
|
+
}
|
400
|
+
return "prefix";
|
401
|
+
},
|
402
|
+
|
403
|
+
getEventTargetType: function(event) {
|
404
|
+
// Return the part of a node, that a click event occured on.
|
405
|
+
// Note: there is no check, if the was fired on TIHS node.
|
406
|
+
var tcn = event && event.target ? event.target.className : "";
|
407
|
+
var cns = this.tree.options.classNames;
|
408
|
+
|
409
|
+
if( tcn == cns.title )
|
410
|
+
return "title";
|
411
|
+
else if( tcn==cns.expander )
|
412
|
+
return "expander";
|
413
|
+
else if( tcn==cns.checkbox )
|
414
|
+
return "checkbox";
|
415
|
+
else if( tcn==cns.nodeIcon )
|
416
|
+
return "icon";
|
417
|
+
else if( tcn==cns.empty || tcn==cns.vline || tcn==cns.connector )
|
418
|
+
return "prefix";
|
419
|
+
else if( tcn.indexOf(cns.folder)>=0 || tcn.indexOf(cns.document)>=0 )
|
420
|
+
// FIX issue #93
|
421
|
+
return this._getTypeForOuterNodeEvent(event);
|
422
|
+
return null;
|
423
|
+
},
|
424
|
+
|
425
|
+
isVisible: function() {
|
426
|
+
// Return true, if all parents are expanded.
|
427
|
+
var parents = this._parentList(true, false);
|
428
|
+
for(var i=0; i<parents.length; i++)
|
429
|
+
if( ! parents[i].bExpanded ) return false;
|
430
|
+
return true;
|
431
|
+
},
|
432
|
+
|
433
|
+
makeVisible: function() {
|
434
|
+
// Make sure, all parents are expanded
|
435
|
+
var parents = this._parentList(true, false);
|
436
|
+
for(var i=0; i<parents.length; i++)
|
437
|
+
parents[i]._expand(true);
|
438
|
+
},
|
439
|
+
|
440
|
+
focus: function() {
|
441
|
+
// TODO: check, if we already have focus
|
442
|
+
// this.tree.logDebug("dtnode.focus(): %o", this);
|
443
|
+
this.makeVisible();
|
444
|
+
try {
|
445
|
+
$(this.span).find(">a").focus();
|
446
|
+
} catch(e) { }
|
447
|
+
},
|
448
|
+
|
449
|
+
_activate: function(flag, fireEvents) {
|
450
|
+
// (De)Activate - but not focus - this node.
|
451
|
+
this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o", flag, fireEvents, this);
|
452
|
+
var opts = this.tree.options;
|
453
|
+
if( this.data.isStatusNode )
|
454
|
+
return;
|
455
|
+
if ( fireEvents && opts.onQueryActivate && opts.onQueryActivate.call(this.span, flag, this) == false )
|
456
|
+
return; // Callback returned false
|
457
|
+
|
458
|
+
if( flag ) {
|
459
|
+
// Activate
|
460
|
+
if( this.tree.activeNode ) {
|
461
|
+
if( this.tree.activeNode === this )
|
462
|
+
return;
|
463
|
+
this.tree.activeNode.deactivate();
|
464
|
+
}
|
465
|
+
if( opts.activeVisible )
|
466
|
+
this.makeVisible();
|
467
|
+
this.tree.activeNode = this;
|
468
|
+
if( opts.persist )
|
469
|
+
$.cookie(opts.cookieId+"-active", this.data.key, opts.cookie);
|
470
|
+
$(this.span).addClass(opts.classNames.active);
|
471
|
+
if ( fireEvents && opts.onActivate ) // Pass element as 'this' (jQuery convention)
|
472
|
+
opts.onActivate.call(this.span, this);
|
473
|
+
} else {
|
474
|
+
// Deactivate
|
475
|
+
if( this.tree.activeNode === this ) {
|
476
|
+
var opts = this.tree.options;
|
477
|
+
if ( opts.onQueryActivate && opts.onQueryActivate.call(this.span, false, this) == false )
|
478
|
+
return; // Callback returned false
|
479
|
+
$(this.span).removeClass(opts.classNames.active);
|
480
|
+
if( opts.persist ) {
|
481
|
+
// Note: we don't pass null, but ''. So the cookie is not deleted.
|
482
|
+
// If we pass null, we also have to pass a COPY of opts, because $cookie will override opts.expires (issue 84)
|
483
|
+
$.cookie(opts.cookieId+"-active", "", opts.cookie);
|
484
|
+
}
|
485
|
+
this.tree.activeNode = null;
|
486
|
+
if ( fireEvents && opts.onDeactivate )
|
487
|
+
opts.onDeactivate.call(this.span, this);
|
488
|
+
}
|
489
|
+
}
|
490
|
+
},
|
491
|
+
|
492
|
+
activate: function() {
|
493
|
+
// Select - but not focus - this node.
|
494
|
+
// this.tree.logDebug("dtnode.activate(): %o", this);
|
495
|
+
this._activate(true, true);
|
496
|
+
},
|
497
|
+
|
498
|
+
deactivate: function() {
|
499
|
+
// this.tree.logDebug("dtnode.deactivate(): %o", this);
|
500
|
+
this._activate(false, true);
|
501
|
+
},
|
502
|
+
|
503
|
+
isActive: function() {
|
504
|
+
return (this.tree.activeNode === this);
|
505
|
+
},
|
506
|
+
|
507
|
+
_userActivate: function() {
|
508
|
+
// Handle user click / [space] / [enter], according to clickFolderMode.
|
509
|
+
var activate = true;
|
510
|
+
var expand = false;
|
511
|
+
if ( this.data.isFolder ) {
|
512
|
+
switch( this.tree.options.clickFolderMode ) {
|
513
|
+
case 2:
|
514
|
+
activate = false;
|
515
|
+
expand = true;
|
516
|
+
break;
|
517
|
+
case 3:
|
518
|
+
activate = expand = true;
|
519
|
+
break;
|
520
|
+
}
|
521
|
+
}
|
522
|
+
if( this.parent == null && this.tree.options.minExpandLevel>0 ) {
|
523
|
+
expand = false;
|
524
|
+
}
|
525
|
+
if( expand ) {
|
526
|
+
this.toggleExpand();
|
527
|
+
this.focus();
|
528
|
+
}
|
529
|
+
if( activate ) {
|
530
|
+
this.activate();
|
531
|
+
}
|
532
|
+
},
|
533
|
+
|
534
|
+
_setSubSel: function(hasSubSel) {
|
535
|
+
if( hasSubSel ) {
|
536
|
+
this.hasSubSel = true;
|
537
|
+
$(this.span).addClass(this.tree.options.classNames.partsel);
|
538
|
+
} else {
|
539
|
+
this.hasSubSel = false;
|
540
|
+
$(this.span).removeClass(this.tree.options.classNames.partsel);
|
541
|
+
}
|
542
|
+
},
|
543
|
+
|
544
|
+
_fixSelectionState: function() {
|
545
|
+
// fix selection status, for multi-hier mode
|
546
|
+
// this.tree.logDebug("_fixSelectionState(%o) - %o", this.bSelected, this);
|
547
|
+
if( this.bSelected ) {
|
548
|
+
// Select all children
|
549
|
+
this.visit(function(dtnode){
|
550
|
+
dtnode.parent._setSubSel(true);
|
551
|
+
dtnode._select(true, false, false);
|
552
|
+
});
|
553
|
+
// Select parents, if all children are selected
|
554
|
+
var p = this.parent;
|
555
|
+
while( p ) {
|
556
|
+
p._setSubSel(true);
|
557
|
+
var allChildsSelected = true;
|
558
|
+
for(var i=0; i<p.childList.length; i++) {
|
559
|
+
var n = p.childList[i];
|
560
|
+
if( !n.bSelected && !n.data.isStatusNode ) {
|
561
|
+
allChildsSelected = false;
|
562
|
+
break;
|
563
|
+
}
|
564
|
+
}
|
565
|
+
if( allChildsSelected )
|
566
|
+
p._select(true, false, false);
|
567
|
+
p = p.parent;
|
568
|
+
}
|
569
|
+
} else {
|
570
|
+
// Deselect all children
|
571
|
+
this._setSubSel(false);
|
572
|
+
this.visit(function(dtnode){
|
573
|
+
dtnode._setSubSel(false);
|
574
|
+
dtnode._select(false, false, false);
|
575
|
+
});
|
576
|
+
// Deselect parents, and recalc hasSubSel
|
577
|
+
var p = this.parent;
|
578
|
+
while( p ) {
|
579
|
+
p._select(false, false, false);
|
580
|
+
var isPartSel = false;
|
581
|
+
for(var i=0; i<p.childList.length; i++) {
|
582
|
+
if( p.childList[i].bSelected || p.childList[i].hasSubSel ) {
|
583
|
+
isPartSel = true;
|
584
|
+
break;
|
585
|
+
}
|
586
|
+
}
|
587
|
+
p._setSubSel(isPartSel);
|
588
|
+
p = p.parent;
|
589
|
+
}
|
590
|
+
}
|
591
|
+
},
|
592
|
+
|
593
|
+
_select: function(sel, fireEvents, deep) {
|
594
|
+
// Select - but not focus - this node.
|
595
|
+
// this.tree.logDebug("dtnode._select(%o) - %o", sel, this);
|
596
|
+
var opts = this.tree.options;
|
597
|
+
if( this.data.isStatusNode )
|
598
|
+
return;
|
599
|
+
//
|
600
|
+
if( this.bSelected == sel ) {
|
601
|
+
// this.tree.logDebug("dtnode._select(%o) IGNORED - %o", sel, this);
|
602
|
+
return;
|
603
|
+
}
|
604
|
+
// Allow event listener to abort selection
|
605
|
+
if ( fireEvents && opts.onQuerySelect && opts.onQuerySelect.call(this.span, sel, this) == false )
|
606
|
+
return; // Callback returned false
|
607
|
+
|
608
|
+
// Force single-selection
|
609
|
+
if( opts.selectMode==1 && sel ) {
|
610
|
+
this.tree.visit(function(dtnode){
|
611
|
+
if( dtnode.bSelected ) {
|
612
|
+
// Deselect; assuming that in selectMode:1 there's max. one other selected node
|
613
|
+
dtnode._select(false, false, false);
|
614
|
+
return false;
|
615
|
+
}
|
616
|
+
});
|
617
|
+
}
|
618
|
+
|
619
|
+
this.bSelected = sel;
|
620
|
+
// this.tree._changeNodeList("select", this, sel);
|
621
|
+
|
622
|
+
if( sel ) {
|
623
|
+
if( opts.persist )
|
624
|
+
this.tree.persistence.addSelect(this.data.key);
|
625
|
+
|
626
|
+
$(this.span).addClass(opts.classNames.selected);
|
627
|
+
|
628
|
+
if( deep && opts.selectMode==3 )
|
629
|
+
this._fixSelectionState();
|
630
|
+
|
631
|
+
if ( fireEvents && opts.onSelect )
|
632
|
+
opts.onSelect.call(this.span, true, this);
|
633
|
+
|
634
|
+
} else {
|
635
|
+
if( opts.persist )
|
636
|
+
this.tree.persistence.clearSelect(this.data.key);
|
637
|
+
|
638
|
+
$(this.span).removeClass(opts.classNames.selected);
|
639
|
+
|
640
|
+
if( deep && opts.selectMode==3 )
|
641
|
+
this._fixSelectionState();
|
642
|
+
|
643
|
+
if ( fireEvents && opts.onSelect )
|
644
|
+
opts.onSelect.call(this.span, false, this);
|
645
|
+
}
|
646
|
+
},
|
647
|
+
|
648
|
+
select: function(sel) {
|
649
|
+
// Select - but not focus - this node.
|
650
|
+
// this.tree.logDebug("dtnode.select(%o) - %o", sel, this);
|
651
|
+
return this._select(sel!=false, true, true);
|
652
|
+
},
|
653
|
+
|
654
|
+
toggleSelect: function() {
|
655
|
+
// this.tree.logDebug("dtnode.toggleSelect() - %o", this);
|
656
|
+
return this.select(!this.bSelected);
|
657
|
+
},
|
658
|
+
|
659
|
+
isSelected: function() {
|
660
|
+
return this.bSelected;
|
661
|
+
},
|
662
|
+
|
663
|
+
_expand: function(bExpand) {
|
664
|
+
// this.tree.logDebug("dtnode._expand(%o) - %o", bExpand, this);
|
665
|
+
if( this.bExpanded == bExpand ) {
|
666
|
+
// this.tree.logDebug("dtnode._expand(%o) IGNORED - %o", bExpand, this);
|
667
|
+
return;
|
668
|
+
}
|
669
|
+
var opts = this.tree.options;
|
670
|
+
if( !bExpand && this.getLevel()<opts.minExpandLevel ) {
|
671
|
+
this.tree.logDebug("dtnode._expand(%o) forced expand - %o", bExpand, this);
|
672
|
+
return;
|
673
|
+
}
|
674
|
+
if ( opts.onQueryExpand && opts.onQueryExpand.call(this.span, bExpand, this) == false )
|
675
|
+
return; // Callback returned false
|
676
|
+
this.bExpanded = bExpand;
|
677
|
+
|
678
|
+
// Persist expand state
|
679
|
+
if( opts.persist ) {
|
680
|
+
if( bExpand )
|
681
|
+
this.tree.persistence.addExpand(this.data.key);
|
682
|
+
else
|
683
|
+
this.tree.persistence.clearExpand(this.data.key);
|
684
|
+
}
|
685
|
+
|
686
|
+
this.render(false);
|
687
|
+
|
688
|
+
// Auto-collapse mode: collapse all siblings
|
689
|
+
if( this.bExpanded && this.parent && opts.autoCollapse ) {
|
690
|
+
var parents = this._parentList(false, true);
|
691
|
+
for(var i=0; i<parents.length; i++)
|
692
|
+
parents[i].collapseSiblings();
|
693
|
+
}
|
694
|
+
|
695
|
+
// If currently active node is now hidden, deactivate it
|
696
|
+
if( opts.activeVisible && this.tree.activeNode && ! this.tree.activeNode.isVisible() ) {
|
697
|
+
this.tree.activeNode.deactivate();
|
698
|
+
}
|
699
|
+
// Expanding a lazy node: set 'loading...' and call callback
|
700
|
+
if( bExpand && this.data.isLazy && !this.isRead && !this.isLoading ) {
|
701
|
+
try {
|
702
|
+
this.tree.logDebug("_expand: start lazy - %o", this);
|
703
|
+
this.setLazyNodeStatus(DTNodeStatus_Loading);
|
704
|
+
if( true == opts.onLazyRead.call(this.span, this) ) {
|
705
|
+
// If function returns 'true', we assume that the loading is done:
|
706
|
+
this.setLazyNodeStatus(DTNodeStatus_Ok);
|
707
|
+
// Otherwise (i.e. if the loading was started as an asynchronous process)
|
708
|
+
// the onLazyRead(dtnode) handler is expected to call dtnode.setLazyNodeStatus(DTNodeStatus_Ok/_Error) when done.
|
709
|
+
this.tree.logDebug("_expand: lazy succeeded - %o", this);
|
710
|
+
}
|
711
|
+
} catch(e) {
|
712
|
+
this.setLazyNodeStatus(DTNodeStatus_Error);
|
713
|
+
}
|
714
|
+
return;
|
715
|
+
}
|
716
|
+
// this.tree.logDebug("_expand: start div toggle - %o", this);
|
717
|
+
|
718
|
+
var fxDuration = opts.fx ? (opts.fx.duration || 200) : 0;
|
719
|
+
for(var i=0; i<this.childList.length; i++ ) {
|
720
|
+
var $child = $(this.childList[i].div);
|
721
|
+
if( fxDuration ) {
|
722
|
+
// This is a toggle, so only do it, if not already rendered (in)visible (issue 98)
|
723
|
+
if( bExpand != $child.is(':visible') )
|
724
|
+
$child.animate(opts.fx, fxDuration);
|
725
|
+
} else {
|
726
|
+
if( bExpand )
|
727
|
+
$child.show();
|
728
|
+
else
|
729
|
+
$child.hide(); // TODO: this seems to be slow, when called the first time for an element
|
730
|
+
}
|
731
|
+
}
|
732
|
+
|
733
|
+
/* issue 109: using selector filter is really SLOW.
|
734
|
+
// issue 98: only toggle, if render hasn't set visibility already:
|
735
|
+
var filter = ">DIV" + (bExpand ? ":hidden" : ":visible");
|
736
|
+
|
737
|
+
if( opts.fx ) {
|
738
|
+
var duration = opts.fx.duration || 200;
|
739
|
+
// $(">DIV", this.div).animate(opts.fx, duration);
|
740
|
+
$(filter, this.div).animate(opts.fx, duration);
|
741
|
+
} else {
|
742
|
+
$(filter, this.div).toggle();
|
743
|
+
// var $d = $(">DIV", this.div);
|
744
|
+
// this.tree.logDebug("_expand: got div, start toggle - %o", this);
|
745
|
+
// $d.toggle();
|
746
|
+
}
|
747
|
+
//*/
|
748
|
+
// this.tree.logDebug("_expand: end div toggle - %o", this);
|
749
|
+
|
750
|
+
if ( opts.onExpand )
|
751
|
+
opts.onExpand.call(this.span, bExpand, this);
|
752
|
+
},
|
753
|
+
|
754
|
+
expand: function(flag) {
|
755
|
+
if( !this.childList && !this.data.isLazy && flag )
|
756
|
+
return; // Prevent expanding empty nodes
|
757
|
+
if( this.parent == null && this.tree.options.minExpandLevel>0 && !flag)
|
758
|
+
return; // Prevent collapsing the root
|
759
|
+
this._expand(flag);
|
760
|
+
},
|
761
|
+
|
762
|
+
toggleExpand: function() {
|
763
|
+
this.expand(!this.bExpanded);
|
764
|
+
},
|
765
|
+
|
766
|
+
collapseSiblings: function() {
|
767
|
+
if( this.parent == null )
|
768
|
+
return;
|
769
|
+
var ac = this.parent.childList;
|
770
|
+
for (var i=0; i<ac.length; i++) {
|
771
|
+
if ( ac[i] !== this && ac[i].bExpanded )
|
772
|
+
ac[i]._expand(false);
|
773
|
+
}
|
774
|
+
},
|
775
|
+
|
776
|
+
onClick: function(event) {
|
777
|
+
// this.tree.logDebug("dtnode.onClick(" + event.type + "): dtnode:" + this + ", button:" + event.button + ", which: " + event.which);
|
778
|
+
var targetType = this.getEventTargetType(event);
|
779
|
+
// if( $(event.target).hasClass(this.tree.options.classNames.expander) ) {
|
780
|
+
if( targetType == "expander" ) {
|
781
|
+
// Clicking the expander icon always expands/collapses
|
782
|
+
this.toggleExpand();
|
783
|
+
// } else if( $(event.target).hasClass(this.tree.options.classNames.checkbox) ) {
|
784
|
+
} else if( targetType == "checkbox" ) {
|
785
|
+
// Clicking the checkbox always (de)selects
|
786
|
+
this.toggleSelect();
|
787
|
+
} else {
|
788
|
+
this._userActivate();
|
789
|
+
// Chrome and Safari don't focus the a-tag on click
|
790
|
+
// this.tree.logDebug("a tag: ", this.span.getElementsByTagName("a")[0]);
|
791
|
+
this.span.getElementsByTagName("a")[0].focus();
|
792
|
+
// alert("hasFocus=" + this.span.getElementsByTagName("a")[0].focused);
|
793
|
+
}
|
794
|
+
// Make sure that clicks stop, otherwise <a href='#'> jumps to the top
|
795
|
+
return false;
|
796
|
+
},
|
797
|
+
|
798
|
+
onDblClick: function(event) {
|
799
|
+
// this.tree.logDebug("dtnode.onDblClick(" + event.type + "): dtnode:" + this + ", button:" + event.button + ", which: " + event.which);
|
800
|
+
},
|
801
|
+
|
802
|
+
onKeydown: function(event) {
|
803
|
+
// this.tree.logDebug("dtnode.onKeydown(" + event.type + "): dtnode:" + this + ", charCode:" + event.charCode + ", keyCode: " + event.keyCode + ", which: " + event.which);
|
804
|
+
var handled = true;
|
805
|
+
// alert("keyDown" + event.which);
|
806
|
+
|
807
|
+
switch( event.which ) {
|
808
|
+
// charCodes:
|
809
|
+
// case 43: // '+'
|
810
|
+
case 107: // '+'
|
811
|
+
case 187: // '+' @ Chrome, Safari
|
812
|
+
if( !this.bExpanded ) this.toggleExpand();
|
813
|
+
break;
|
814
|
+
// case 45: // '-'
|
815
|
+
case 109: // '-'
|
816
|
+
case 189: // '+' @ Chrome, Safari
|
817
|
+
if( this.bExpanded ) this.toggleExpand();
|
818
|
+
break;
|
819
|
+
//~ case 42: // '*'
|
820
|
+
//~ break;
|
821
|
+
//~ case 47: // '/'
|
822
|
+
//~ break;
|
823
|
+
// case 13: // <enter>
|
824
|
+
// <enter> on a focused <a> tag seems to generate a click-event.
|
825
|
+
// this._userActivate();
|
826
|
+
// break;
|
827
|
+
case 32: // <space>
|
828
|
+
this._userActivate();
|
829
|
+
break;
|
830
|
+
case 8: // <backspace>
|
831
|
+
if( this.parent )
|
832
|
+
this.parent.focus();
|
833
|
+
break;
|
834
|
+
case 37: // <left>
|
835
|
+
if( this.bExpanded ) {
|
836
|
+
this.toggleExpand();
|
837
|
+
this.focus();
|
838
|
+
} else if( this.parent && (this.tree.options.rootVisible || this.parent.parent) ) {
|
839
|
+
this.parent.focus();
|
840
|
+
}
|
841
|
+
break;
|
842
|
+
case 39: // <right>
|
843
|
+
if( !this.bExpanded && (this.childList || this.data.isLazy) ) {
|
844
|
+
this.toggleExpand();
|
845
|
+
this.focus();
|
846
|
+
} else if( this.childList ) {
|
847
|
+
this.childList[0].focus();
|
848
|
+
}
|
849
|
+
break;
|
850
|
+
case 38: // <up>
|
851
|
+
var sib = this.prevSibling();
|
852
|
+
while( sib && sib.bExpanded && sib.childList )
|
853
|
+
sib = sib.childList[sib.childList.length-1];
|
854
|
+
if( !sib && this.parent && (this.tree.options.rootVisible || this.parent.parent) )
|
855
|
+
sib = this.parent;
|
856
|
+
if( sib ) sib.focus();
|
857
|
+
break;
|
858
|
+
case 40: // <down>
|
859
|
+
var sib;
|
860
|
+
if( this.bExpanded && this.childList ) {
|
861
|
+
sib = this.childList[0];
|
862
|
+
} else {
|
863
|
+
var parents = this._parentList(false, true);
|
864
|
+
for(var i=parents.length-1; i>=0; i--) {
|
865
|
+
sib = parents[i].nextSibling();
|
866
|
+
if( sib ) break;
|
867
|
+
}
|
868
|
+
}
|
869
|
+
if( sib ) sib.focus();
|
870
|
+
break;
|
871
|
+
default:
|
872
|
+
handled = false;
|
873
|
+
}
|
874
|
+
// Return false, if handled, to prevent default processing
|
875
|
+
return !handled;
|
876
|
+
},
|
877
|
+
|
878
|
+
onKeypress: function(event) {
|
879
|
+
// onKeypress is only hooked to allow user callbacks.
|
880
|
+
// We don't process it, because IE and Safari don't fire keypress for cursor keys.
|
881
|
+
// this.tree.logDebug("dtnode.onKeypress(" + event.type + "): dtnode:" + this + ", charCode:" + event.charCode + ", keyCode: " + event.keyCode + ", which: " + event.which);
|
882
|
+
},
|
883
|
+
|
884
|
+
onFocus: function(event) {
|
885
|
+
// Handles blur and focus events.
|
886
|
+
// this.tree.logDebug("dtnode.onFocus(%o): %o", event, this);
|
887
|
+
var opts = this.tree.options;
|
888
|
+
if ( event.type=="blur" || event.type=="focusout" ) {
|
889
|
+
if ( opts.onBlur ) // Pass element as 'this' (jQuery convention)
|
890
|
+
opts.onBlur.call(this.span, this);
|
891
|
+
if( this.tree.tnFocused )
|
892
|
+
$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);
|
893
|
+
this.tree.tnFocused = null;
|
894
|
+
if( opts.persist )
|
895
|
+
$.cookie(opts.cookieId+"-focus", "", opts.cookie);
|
896
|
+
} else if ( event.type=="focus" || event.type=="focusin") {
|
897
|
+
// Fix: sometimes the blur event is not generated
|
898
|
+
if( this.tree.tnFocused && this.tree.tnFocused !== this ) {
|
899
|
+
this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o", this.tree.tnFocused);
|
900
|
+
$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);
|
901
|
+
}
|
902
|
+
this.tree.tnFocused = this;
|
903
|
+
if ( opts.onFocus ) // Pass element as 'this' (jQuery convention)
|
904
|
+
opts.onFocus.call(this.span, this);
|
905
|
+
$(this.tree.tnFocused.span).addClass(opts.classNames.focused);
|
906
|
+
if( opts.persist )
|
907
|
+
$.cookie(opts.cookieId+"-focus", this.data.key, opts.cookie);
|
908
|
+
}
|
909
|
+
// TODO: return anything?
|
910
|
+
// return false;
|
911
|
+
},
|
912
|
+
|
913
|
+
visit: function(fn, data, includeSelf) {
|
914
|
+
// Call fn(dtnode, data) for all child nodes. Stop iteration, if fn() returns false.
|
915
|
+
var n = 0;
|
916
|
+
if( includeSelf == true ) {
|
917
|
+
if( fn(this, data) == false )
|
918
|
+
return 1;
|
919
|
+
n++;
|
920
|
+
}
|
921
|
+
if ( this.childList )
|
922
|
+
for (var i=0; i<this.childList.length; i++)
|
923
|
+
n += this.childList[i].visit(fn, data, true);
|
924
|
+
return n;
|
925
|
+
},
|
926
|
+
|
927
|
+
remove: function() {
|
928
|
+
// Remove this node
|
929
|
+
// this.tree.logDebug ("%o.remove()", this);
|
930
|
+
if ( this === this.tree.root )
|
931
|
+
return false;
|
932
|
+
return this.parent.removeChild(this);
|
933
|
+
},
|
934
|
+
|
935
|
+
removeChild: function(tn) {
|
936
|
+
// Remove tn from list of direct children.
|
937
|
+
var ac = this.childList;
|
938
|
+
if( ac.length == 1 ) {
|
939
|
+
if( tn !== ac[0] )
|
940
|
+
throw "removeChild: invalid child";
|
941
|
+
return this.removeChildren();
|
942
|
+
}
|
943
|
+
if( tn === this.tree.activeNode )
|
944
|
+
tn.deactivate();
|
945
|
+
if( this.tree.options.persist ) {
|
946
|
+
if( tn.bSelected )
|
947
|
+
this.tree.persistence.clearSelect(tn.data.key);
|
948
|
+
if ( tn.bExpanded )
|
949
|
+
this.tree.persistence.clearExpand(tn.data.key);
|
950
|
+
}
|
951
|
+
tn.removeChildren(true);
|
952
|
+
this.div.removeChild(tn.div);
|
953
|
+
for(var i=0; i<ac.length; i++) {
|
954
|
+
if( ac[i] === tn ) {
|
955
|
+
this.childList.splice(i, 1);
|
956
|
+
delete tn;
|
957
|
+
break;
|
958
|
+
}
|
959
|
+
}
|
960
|
+
},
|
961
|
+
|
962
|
+
removeChildren: function(recursive) {
|
963
|
+
// Remove all child nodes (more efficiently than recursive remove())
|
964
|
+
// this.tree.logDebug ("%o.removeChildren(%o)", this, recursive);
|
965
|
+
var tree = this.tree;
|
966
|
+
var ac = this.childList;
|
967
|
+
if( ac ) {
|
968
|
+
for(var i=0; i<ac.length; i++) {
|
969
|
+
var tn=ac[i];
|
970
|
+
// this.tree.logDebug ("del %o", tn);
|
971
|
+
if ( tn === tree.activeNode )
|
972
|
+
tn.deactivate();
|
973
|
+
if( this.tree.options.persist ) {
|
974
|
+
if( tn.bSelected )
|
975
|
+
this.tree.persistence.clearSelect(tn.data.key);
|
976
|
+
if ( tn.bExpanded )
|
977
|
+
this.tree.persistence.clearExpand(tn.data.key);
|
978
|
+
}
|
979
|
+
tn.removeChildren(true);
|
980
|
+
this.div.removeChild(tn.div);
|
981
|
+
delete tn;
|
982
|
+
}
|
983
|
+
this.childList = null;
|
984
|
+
if( ! recursive ) {
|
985
|
+
this._expand(false);
|
986
|
+
this.isRead = false;
|
987
|
+
this.isLoading = false;
|
988
|
+
this.render(false, false);
|
989
|
+
}
|
990
|
+
}
|
991
|
+
},
|
992
|
+
|
993
|
+
_addChildNode: function(dtnode, insertBefore) {
|
994
|
+
/**
|
995
|
+
* Internal function to add one single DynatreeNode as a child.
|
996
|
+
*
|
997
|
+
*/
|
998
|
+
var tree = this.tree;
|
999
|
+
var opts = tree.options;
|
1000
|
+
var pers = tree.persistence;
|
1001
|
+
|
1002
|
+
// tree.logDebug("%o._addChildNode(%o)", this, dtnode);
|
1003
|
+
|
1004
|
+
// --- Add dtnode as a child
|
1005
|
+
// TODO: implement insertBefore
|
1006
|
+
|
1007
|
+
if ( this.childList==null ) {
|
1008
|
+
this.childList = [];
|
1009
|
+
} else {
|
1010
|
+
// Fix 'lastsib'
|
1011
|
+
$(this.childList[this.childList.length-1].span).removeClass(opts.classNames.lastsib);
|
1012
|
+
}
|
1013
|
+
this.childList.push (dtnode);
|
1014
|
+
|
1015
|
+
// --- Update and fix dtnode attributes if necessary
|
1016
|
+
dtnode.parent = this;
|
1017
|
+
|
1018
|
+
// --- Handle persistence
|
1019
|
+
// Initial status is read from cookies, if persistence is active and
|
1020
|
+
// cookies are already present.
|
1021
|
+
// Otherwise the status is read from the data attributes and then persisted.
|
1022
|
+
var isInitializing = tree.isInitializing();
|
1023
|
+
if( opts.persist && pers.cookiesFound && isInitializing ) {
|
1024
|
+
// Init status from cookies
|
1025
|
+
// tree.logDebug("init from cookie, pa=%o, dk=%o", pers.activeKey, dtnode.data.key);
|
1026
|
+
if( pers.activeKey == dtnode.data.key )
|
1027
|
+
tree.activeNode = dtnode;
|
1028
|
+
if( pers.focusedKey == dtnode.data.key )
|
1029
|
+
tree.focusNode = dtnode;
|
1030
|
+
dtnode.bExpanded = ($.inArray(dtnode.data.key, pers.expandedKeyList) >= 0);
|
1031
|
+
dtnode.bSelected = ($.inArray(dtnode.data.key, pers.selectedKeyList) >= 0);
|
1032
|
+
} else {
|
1033
|
+
// Init status from data (Note: we write the cookies after the init phase)
|
1034
|
+
// tree.logDebug("init from data");
|
1035
|
+
if( dtnode.data.activate ) {
|
1036
|
+
tree.activeNode = dtnode;
|
1037
|
+
if( opts.persist )
|
1038
|
+
pers.activeKey = dtnode.data.key;
|
1039
|
+
}
|
1040
|
+
if( dtnode.data.focus ) {
|
1041
|
+
tree.focusNode = dtnode;
|
1042
|
+
if( opts.persist )
|
1043
|
+
pers.focusedKey = dtnode.data.key;
|
1044
|
+
}
|
1045
|
+
dtnode.bExpanded = ( dtnode.data.expand == true ); // Collapsed by default
|
1046
|
+
if( dtnode.bExpanded && opts.persist )
|
1047
|
+
pers.addExpand(dtnode.data.key);
|
1048
|
+
dtnode.bSelected = ( dtnode.data.select == true ); // Deselected by default
|
1049
|
+
if( dtnode.bSelected && opts.persist )
|
1050
|
+
pers.addSelect(dtnode.data.key);
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
// Always expand, if it's below minExpandLevel
|
1054
|
+
// tree.logDebug ("%o._addChildNode(%o), l=%o", this, dtnode, dtnode.getLevel());
|
1055
|
+
if ( opts.minExpandLevel >= dtnode.getLevel() ) {
|
1056
|
+
tree.logDebug ("Force expand for %o", dtnode);
|
1057
|
+
this.bExpanded = true;
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
// In multi-hier mode, update the parents selection state
|
1061
|
+
// issue #82: only if not initializing, because the children may not exist yet
|
1062
|
+
// if( !dtnode.data.isStatusNode && opts.selectMode==3 && !isInitializing )
|
1063
|
+
// dtnode._fixSelectionState();
|
1064
|
+
|
1065
|
+
// In multi-hier mode, update the parents selection state
|
1066
|
+
if( dtnode.bSelected && opts.selectMode==3 ) {
|
1067
|
+
var p = this;
|
1068
|
+
while( p ) {
|
1069
|
+
if( !p.hasSubSel )
|
1070
|
+
p._setSubSel(true);
|
1071
|
+
p = p.parent;
|
1072
|
+
}
|
1073
|
+
}
|
1074
|
+
// render this node and the new child
|
1075
|
+
if ( tree.bEnableUpdate )
|
1076
|
+
this.render(true, true);
|
1077
|
+
|
1078
|
+
return dtnode;
|
1079
|
+
},
|
1080
|
+
|
1081
|
+
addChild: function(obj, insertBefore) {
|
1082
|
+
/**
|
1083
|
+
* Add a node object as child.
|
1084
|
+
*
|
1085
|
+
* This should be the only place, where a DynaTreeNode is constructed!
|
1086
|
+
* (Except for the root node creation in the tree constructor)
|
1087
|
+
*
|
1088
|
+
* @param obj A JS object (may be recursive) or an array of those.
|
1089
|
+
* @param {DynaTreeNode} insertBefore (optional) sibling node.
|
1090
|
+
*
|
1091
|
+
* Data format: array of node objects, with optional 'children' attributes.
|
1092
|
+
* [
|
1093
|
+
* { title: "t1", isFolder: true, ... }
|
1094
|
+
* { title: "t2", isFolder: true, ...,
|
1095
|
+
* children: [
|
1096
|
+
* {title: "t2.1", ..},
|
1097
|
+
* {..}
|
1098
|
+
* ]
|
1099
|
+
* }
|
1100
|
+
* ]
|
1101
|
+
* A simple object is also accepted instead of an array.
|
1102
|
+
*
|
1103
|
+
*/
|
1104
|
+
// this.tree.logDebug("%o.addChild(%o, %o)", this, obj, insertBefore);
|
1105
|
+
if( !obj || obj.length==0 ) // Passed null or undefined or empty array
|
1106
|
+
return;
|
1107
|
+
if( obj instanceof DynaTreeNode )
|
1108
|
+
return this._addChildNode(obj, insertBefore);
|
1109
|
+
if( !obj.length ) // Passed a single data object
|
1110
|
+
obj = [ obj ];
|
1111
|
+
|
1112
|
+
var prevFlag = this.tree.enableUpdate(false);
|
1113
|
+
|
1114
|
+
var tnFirst = null;
|
1115
|
+
for (var i=0; i<obj.length; i++) {
|
1116
|
+
var data = obj[i];
|
1117
|
+
var dtnode = this._addChildNode(new DynaTreeNode(this, this.tree, data), insertBefore);
|
1118
|
+
if( !tnFirst ) tnFirst = dtnode;
|
1119
|
+
// Add child nodes recursively
|
1120
|
+
if( data.children )
|
1121
|
+
dtnode.addChild(data.children, null);
|
1122
|
+
}
|
1123
|
+
this.tree.enableUpdate(prevFlag);
|
1124
|
+
return tnFirst;
|
1125
|
+
},
|
1126
|
+
|
1127
|
+
append: function(obj) {
|
1128
|
+
/**
|
1129
|
+
* @deprecated
|
1130
|
+
*/
|
1131
|
+
return this.addChild(obj, null);
|
1132
|
+
},
|
1133
|
+
|
1134
|
+
appendAjax: function(ajaxOptions) {
|
1135
|
+
this.setLazyNodeStatus(DTNodeStatus_Loading);
|
1136
|
+
// Ajax option inheritance: $.ajaxSetup < $.ui.dynatree.defaults.ajaxDefaults < tree.options.ajaxDefaults < ajaxOptions
|
1137
|
+
var self = this;
|
1138
|
+
var orgSuccess = ajaxOptions.success;
|
1139
|
+
var orgError = ajaxOptions.error;
|
1140
|
+
var options = $.extend({}, this.tree.options.ajaxDefaults, ajaxOptions, {
|
1141
|
+
success: function(data, textStatus){
|
1142
|
+
// <this> is the request options
|
1143
|
+
var prevPhase = self.tree.phase;
|
1144
|
+
self.tree.phase = "init";
|
1145
|
+
self.append(data);
|
1146
|
+
self.tree.phase = "postInit";
|
1147
|
+
self.setLazyNodeStatus(DTNodeStatus_Ok);
|
1148
|
+
if( orgSuccess )
|
1149
|
+
orgSuccess.call(options, self);
|
1150
|
+
self.tree.phase = prevPhase;
|
1151
|
+
},
|
1152
|
+
error: function(XMLHttpRequest, textStatus, errorThrown){
|
1153
|
+
// <this> is the request options
|
1154
|
+
self.setLazyNodeStatus(DTNodeStatus_Error);
|
1155
|
+
if( orgError )
|
1156
|
+
orgError.call(options, self, XMLHttpRequest, textStatus, errorThrown);
|
1157
|
+
}
|
1158
|
+
});
|
1159
|
+
$.ajax(options);
|
1160
|
+
},
|
1161
|
+
// --- end of class
|
1162
|
+
lastentry: undefined
|
1163
|
+
}
|
1164
|
+
|
1165
|
+
/*************************************************************************
|
1166
|
+
* class DynaTreeStatus
|
1167
|
+
*/
|
1168
|
+
|
1169
|
+
var DynaTreeStatus = Class.create();
|
1170
|
+
|
1171
|
+
|
1172
|
+
DynaTreeStatus._getTreePersistData = function(cookieId, cookieOpts) {
|
1173
|
+
// Static member: Return persistence information from cookies
|
1174
|
+
var ts = new DynaTreeStatus(cookieId, cookieOpts);
|
1175
|
+
ts.read();
|
1176
|
+
return ts.toDict();
|
1177
|
+
}
|
1178
|
+
// Make available in global scope
|
1179
|
+
getDynaTreePersistData = DynaTreeStatus._getTreePersistData;
|
1180
|
+
|
1181
|
+
|
1182
|
+
DynaTreeStatus.prototype = {
|
1183
|
+
// Constructor
|
1184
|
+
initialize: function(cookieId, cookieOpts) {
|
1185
|
+
if( cookieId === undefined )
|
1186
|
+
cookieId = $.ui.dynatree.defaults.cookieId;
|
1187
|
+
cookieOpts = $.extend({}, $.ui.dynatree.defaults.cookie, cookieOpts);
|
1188
|
+
|
1189
|
+
this.cookieId = cookieId;
|
1190
|
+
this.cookieOpts = cookieOpts;
|
1191
|
+
this.cookiesFound = undefined;
|
1192
|
+
this.activeKey = null;
|
1193
|
+
this.focusedKey = null;
|
1194
|
+
this.expandedKeyList = null;
|
1195
|
+
this.selectedKeyList = null;
|
1196
|
+
},
|
1197
|
+
// member functions
|
1198
|
+
_log: function(msg) {
|
1199
|
+
// this.logDebug("_changeNodeList(%o): nodeList:%o, idx:%o", mode, nodeList, idx);
|
1200
|
+
Array.prototype.unshift.apply(arguments, ["debug"]);
|
1201
|
+
_log.apply(this, arguments);
|
1202
|
+
},
|
1203
|
+
read: function() {
|
1204
|
+
// Read or init cookies.
|
1205
|
+
this.cookiesFound = false;
|
1206
|
+
|
1207
|
+
var cookie = $.cookie(this.cookieId + "-active");
|
1208
|
+
this.activeKey = ( cookie == null ) ? "" : cookie;
|
1209
|
+
if( cookie != null ) this.cookiesFound = true;
|
1210
|
+
|
1211
|
+
cookie = $.cookie(this.cookieId + "-focus");
|
1212
|
+
this.focusedKey = ( cookie == null ) ? "" : cookie;
|
1213
|
+
if( cookie != null ) this.cookiesFound = true;
|
1214
|
+
|
1215
|
+
cookie = $.cookie(this.cookieId + "-expand");
|
1216
|
+
this.expandedKeyList = ( cookie == null ) ? [] : cookie.split(",");
|
1217
|
+
if( cookie != null ) this.cookiesFound = true;
|
1218
|
+
|
1219
|
+
cookie = $.cookie(this.cookieId + "-select");
|
1220
|
+
this.selectedKeyList = ( cookie == null ) ? [] : cookie.split(",");
|
1221
|
+
if( cookie != null ) this.cookiesFound = true;
|
1222
|
+
},
|
1223
|
+
write: function() {
|
1224
|
+
$.cookie(this.cookieId + "-active", ( this.activeKey == null ) ? "" : this.activeKey, this.cookieOpts);
|
1225
|
+
$.cookie(this.cookieId + "-focus", ( this.focusedKey == null ) ? "" : this.focusedKey, this.cookieOpts);
|
1226
|
+
$.cookie(this.cookieId + "-expand", ( this.expandedKeyList == null ) ? "" : this.expandedKeyList.join(","), this.cookieOpts);
|
1227
|
+
$.cookie(this.cookieId + "-select", ( this.selectedKeyList == null ) ? "" : this.selectedKeyList.join(","), this.cookieOpts);
|
1228
|
+
},
|
1229
|
+
addExpand: function(key) {
|
1230
|
+
// this._log("addExpand(%o)", key);
|
1231
|
+
if( $.inArray(key, this.expandedKeyList) < 0 ) {
|
1232
|
+
this.expandedKeyList.push(key);
|
1233
|
+
$.cookie(this.cookieId + "-expand", this.expandedKeyList.join(","), this.cookieOpts);
|
1234
|
+
}
|
1235
|
+
},
|
1236
|
+
clearExpand: function(key) {
|
1237
|
+
// this._log("clearExpand(%o)", key);
|
1238
|
+
var idx = $.inArray(key, this.expandedKeyList);
|
1239
|
+
if( idx >= 0 ) {
|
1240
|
+
this.expandedKeyList.splice(idx, 1);
|
1241
|
+
$.cookie(this.cookieId + "-expand", this.expandedKeyList.join(","), this.cookieOpts);
|
1242
|
+
}
|
1243
|
+
},
|
1244
|
+
addSelect: function(key) {
|
1245
|
+
// this._log("addSelect(%o)", key);
|
1246
|
+
if( $.inArray(key, this.selectedKeyList) < 0 ) {
|
1247
|
+
this.selectedKeyList.push(key);
|
1248
|
+
$.cookie(this.cookieId + "-select", this.selectedKeyList.join(","), this.cookieOpts);
|
1249
|
+
}
|
1250
|
+
},
|
1251
|
+
clearSelect: function(key) {
|
1252
|
+
// this._log("clearSelect(%o)", key);
|
1253
|
+
var idx = $.inArray(key, this.selectedKeyList);
|
1254
|
+
if( idx >= 0 ) {
|
1255
|
+
this.selectedKeyList.splice(idx, 1);
|
1256
|
+
$.cookie(this.cookieId + "-select", this.selectedKeyList.join(","), this.cookieOpts);
|
1257
|
+
}
|
1258
|
+
},
|
1259
|
+
isReloading: function() {
|
1260
|
+
return this.cookiesFound == true;
|
1261
|
+
},
|
1262
|
+
toDict: function() {
|
1263
|
+
return {
|
1264
|
+
cookiesFound: this.cookiesFound,
|
1265
|
+
activeKey: this.activeKey,
|
1266
|
+
focusedKey: this.activeKey,
|
1267
|
+
expandedKeyList: this.expandedKeyList,
|
1268
|
+
selectedKeyList: this.selectedKeyList
|
1269
|
+
};
|
1270
|
+
},
|
1271
|
+
// --- end of class
|
1272
|
+
lastentry: undefined
|
1273
|
+
};
|
1274
|
+
|
1275
|
+
|
1276
|
+
/*************************************************************************
|
1277
|
+
* class DynaTree
|
1278
|
+
*/
|
1279
|
+
|
1280
|
+
var DynaTree = Class.create();
|
1281
|
+
|
1282
|
+
// --- Static members ----------------------------------------------------------
|
1283
|
+
|
1284
|
+
DynaTree.version = "$Version: 0.5.0$";
|
1285
|
+
|
1286
|
+
DynaTree._initTree = function() {
|
1287
|
+
};
|
1288
|
+
|
1289
|
+
DynaTree._bind = function() {
|
1290
|
+
};
|
1291
|
+
|
1292
|
+
//--- Class members ------------------------------------------------------------
|
1293
|
+
|
1294
|
+
DynaTree.prototype = {
|
1295
|
+
// Constructor
|
1296
|
+
initialize: function(divContainer, options) {
|
1297
|
+
// instance members
|
1298
|
+
this.phase = "init";
|
1299
|
+
|
1300
|
+
this.options = options;
|
1301
|
+
|
1302
|
+
this.bEnableUpdate = true;
|
1303
|
+
this._nodeCount = 1;
|
1304
|
+
this.activeNode = null;
|
1305
|
+
this.focusNode = null;
|
1306
|
+
|
1307
|
+
this.persistence = new DynaTreeStatus(options.cookieId, options.cookie);
|
1308
|
+
if( this.options.persist ) {
|
1309
|
+
if( !$.cookie )
|
1310
|
+
_log("warn", "Please include jquery.cookie.js to use persistence.");
|
1311
|
+
this.persistence.read();
|
1312
|
+
}
|
1313
|
+
this.logDebug("DynaTree.persistence: %o", this.persistence.toDict());
|
1314
|
+
|
1315
|
+
// Cached tag strings
|
1316
|
+
this.cache = {
|
1317
|
+
tagEmpty: "<span class='" + options.classNames.empty + "'></span>",
|
1318
|
+
tagVline: "<span class='" + options.classNames.vline + "'></span>",
|
1319
|
+
tagExpander: "<span class='" + options.classNames.expander + "'></span>",
|
1320
|
+
tagConnector: "<span class='" + options.classNames.connector + "'></span>",
|
1321
|
+
tagNodeIcon: "<span class='" + options.classNames.nodeIcon + "'></span>",
|
1322
|
+
tagCheckbox: "<span class='" + options.classNames.checkbox + "'></span>",
|
1323
|
+
lastentry: undefined
|
1324
|
+
};
|
1325
|
+
|
1326
|
+
// find container element
|
1327
|
+
this.divTree = divContainer;
|
1328
|
+
// create the root element
|
1329
|
+
this.tnRoot = new DynaTreeNode(null, this, {title: this.options.title, key: "root"});
|
1330
|
+
this.tnRoot.data.isFolder = true;
|
1331
|
+
this.tnRoot.render(false, false);
|
1332
|
+
this.divRoot = this.tnRoot.div;
|
1333
|
+
this.divRoot.className = this.options.classNames.container;
|
1334
|
+
// add root to container
|
1335
|
+
this.divTree.appendChild(this.divRoot);
|
1336
|
+
},
|
1337
|
+
|
1338
|
+
// member functions
|
1339
|
+
|
1340
|
+
toString: function() {
|
1341
|
+
return "DynaTree '" + this.options.title + "'";
|
1342
|
+
},
|
1343
|
+
|
1344
|
+
toDict: function() {
|
1345
|
+
return this.tnRoot.toDict(true);
|
1346
|
+
},
|
1347
|
+
|
1348
|
+
getPersistData: function() {
|
1349
|
+
return this.persistence.toDict();
|
1350
|
+
},
|
1351
|
+
|
1352
|
+
logDebug: function(msg) {
|
1353
|
+
if( this.options.debugLevel >= 2 ) {
|
1354
|
+
Array.prototype.unshift.apply(arguments, ["debug"]);
|
1355
|
+
_log.apply(this, arguments);
|
1356
|
+
}
|
1357
|
+
},
|
1358
|
+
|
1359
|
+
logInfo: function(msg) {
|
1360
|
+
if( this.options.debugLevel >= 1 ) {
|
1361
|
+
Array.prototype.unshift.apply(arguments, ["info"]);
|
1362
|
+
_log.apply(this, arguments);
|
1363
|
+
}
|
1364
|
+
},
|
1365
|
+
|
1366
|
+
logWarning: function(msg) {
|
1367
|
+
Array.prototype.unshift.apply(arguments, ["warn"]);
|
1368
|
+
_log.apply(this, arguments);
|
1369
|
+
},
|
1370
|
+
|
1371
|
+
isInitializing: function() {
|
1372
|
+
return ( this.phase=="init" || this.phase=="postInit" );
|
1373
|
+
},
|
1374
|
+
isReloading: function() {
|
1375
|
+
return ( this.phase=="init" || this.phase=="postInit" ) && this.options.persist && this.persistence.cookiesFound;
|
1376
|
+
},
|
1377
|
+
isUserEvent: function() {
|
1378
|
+
return ( this.phase=="userEvent" );
|
1379
|
+
},
|
1380
|
+
|
1381
|
+
redraw: function() {
|
1382
|
+
this.logDebug("dynatree.redraw()...");
|
1383
|
+
this.tnRoot.render(true, true);
|
1384
|
+
this.logDebug("dynatree.redraw() done.");
|
1385
|
+
},
|
1386
|
+
|
1387
|
+
getRoot: function() {
|
1388
|
+
return this.tnRoot;
|
1389
|
+
},
|
1390
|
+
|
1391
|
+
getNodeByKey: function(key) {
|
1392
|
+
// $("#...") has problems, if the key contains '.', so we use getElementById()
|
1393
|
+
// return $("#" + this.options.idPrefix + key).attr("dtnode");
|
1394
|
+
var el = document.getElementById(this.options.idPrefix + key);
|
1395
|
+
return ( el && el.dtnode ) ? el.dtnode : null;
|
1396
|
+
},
|
1397
|
+
|
1398
|
+
getActiveNode: function() {
|
1399
|
+
return this.activeNode;
|
1400
|
+
},
|
1401
|
+
|
1402
|
+
reactivate: function(setFocus) {
|
1403
|
+
// Re-fire onQueryActivate and onActivate events.
|
1404
|
+
var node = this.activeNode;
|
1405
|
+
if( node ) {
|
1406
|
+
this.activeNode = null; // Force re-activating
|
1407
|
+
node.activate();
|
1408
|
+
if( setFocus )
|
1409
|
+
node.focus();
|
1410
|
+
}
|
1411
|
+
},
|
1412
|
+
|
1413
|
+
getSelectedNodes: function(stopOnParents) {
|
1414
|
+
var nodeList = [];
|
1415
|
+
this.tnRoot.visit(function(dtnode){
|
1416
|
+
if( dtnode.bSelected ) {
|
1417
|
+
nodeList.push(dtnode);
|
1418
|
+
if( stopOnParents == true )
|
1419
|
+
return false; // stop processing this branch
|
1420
|
+
}
|
1421
|
+
});
|
1422
|
+
return nodeList;
|
1423
|
+
},
|
1424
|
+
|
1425
|
+
activateKey: function(key) {
|
1426
|
+
var dtnode = this.getNodeByKey(key);
|
1427
|
+
if( !dtnode ) {
|
1428
|
+
this.activeNode = null;
|
1429
|
+
return null;
|
1430
|
+
}
|
1431
|
+
dtnode.focus();
|
1432
|
+
dtnode.activate();
|
1433
|
+
return dtnode;
|
1434
|
+
},
|
1435
|
+
|
1436
|
+
selectKey: function(key, select) {
|
1437
|
+
var dtnode = this.getNodeByKey(key);
|
1438
|
+
if( !dtnode )
|
1439
|
+
return null;
|
1440
|
+
dtnode.select(select);
|
1441
|
+
return dtnode;
|
1442
|
+
},
|
1443
|
+
|
1444
|
+
enableUpdate: function(bEnable) {
|
1445
|
+
if ( this.bEnableUpdate==bEnable )
|
1446
|
+
return bEnable;
|
1447
|
+
this.bEnableUpdate = bEnable;
|
1448
|
+
if ( bEnable )
|
1449
|
+
this.redraw();
|
1450
|
+
return !bEnable; // return previous value
|
1451
|
+
},
|
1452
|
+
|
1453
|
+
visit: function(fn, data, includeRoot) {
|
1454
|
+
return this.tnRoot.visit(fn, data, includeRoot);
|
1455
|
+
},
|
1456
|
+
|
1457
|
+
_createFromTag: function(parentTreeNode, $ulParent) {
|
1458
|
+
// Convert a <UL>...</UL> list into children of the parent tree node.
|
1459
|
+
var self = this;
|
1460
|
+
/*
|
1461
|
+
TODO: better?
|
1462
|
+
this.$lis = $("li:has(a[href])", this.element);
|
1463
|
+
this.$tabs = this.$lis.map(function() { return $("a", this)[0]; });
|
1464
|
+
*/
|
1465
|
+
$ulParent.find(">li").each(function() {
|
1466
|
+
var $li = $(this);
|
1467
|
+
var $liSpan = $li.find(">span:first");
|
1468
|
+
var title;
|
1469
|
+
if( $liSpan.length ) {
|
1470
|
+
// If a <li><span> tag is specified, use it literally.
|
1471
|
+
title = $liSpan.html();
|
1472
|
+
} else {
|
1473
|
+
// If only a <li> tag is specified, use the trimmed string up to the next child <ul> tag.
|
1474
|
+
title = $li.html();
|
1475
|
+
var iPos = title.search(/<ul/i);
|
1476
|
+
if( iPos>=0 )
|
1477
|
+
title = $.trim(title.substring(0, iPos));
|
1478
|
+
else
|
1479
|
+
title = $.trim(title);
|
1480
|
+
// self.logDebug("%o", title);
|
1481
|
+
}
|
1482
|
+
// Parse node options from ID, title and class attributes
|
1483
|
+
var data = {
|
1484
|
+
title: title,
|
1485
|
+
isFolder: $li.hasClass("folder"),
|
1486
|
+
isLazy: $li.hasClass("lazy"),
|
1487
|
+
expand: $li.hasClass("expanded"),
|
1488
|
+
select: $li.hasClass("selected"),
|
1489
|
+
activate: $li.hasClass("active"),
|
1490
|
+
focus: $li.hasClass("focused")
|
1491
|
+
};
|
1492
|
+
if( $li.attr("title") )
|
1493
|
+
data.tooltip = $li.attr("title");
|
1494
|
+
if( $li.attr("id") )
|
1495
|
+
data.key = $li.attr("id");
|
1496
|
+
// If a data attribute is present, evaluate as a javascript object
|
1497
|
+
if( $li.attr("data") ) {
|
1498
|
+
var dataAttr = $.trim($li.attr("data"));
|
1499
|
+
if( dataAttr ) {
|
1500
|
+
if( dataAttr.charAt(0) != "{" )
|
1501
|
+
dataAttr = "{" + dataAttr + "}"
|
1502
|
+
try {
|
1503
|
+
$.extend(data, eval("(" + dataAttr + ")"));
|
1504
|
+
} catch(e) {
|
1505
|
+
throw ("Error parsing node data: " + e + "\ndata:\n'" + dataAttr + "'");
|
1506
|
+
}
|
1507
|
+
}
|
1508
|
+
}
|
1509
|
+
childNode = parentTreeNode.addChild(data);
|
1510
|
+
// Recursive reading of child nodes, if LI tag contains an UL tag
|
1511
|
+
var $ul = $li.find(">ul:first");
|
1512
|
+
if( $ul.length ) {
|
1513
|
+
self._createFromTag(childNode, $ul); // must use 'self', because 'this' is the each() context
|
1514
|
+
}
|
1515
|
+
});
|
1516
|
+
},
|
1517
|
+
|
1518
|
+
_checkConsistency: function() {
|
1519
|
+
// this.logDebug("tree._checkConsistency() NOT IMPLEMENTED - %o", this);
|
1520
|
+
},
|
1521
|
+
|
1522
|
+
// --- end of class
|
1523
|
+
lastentry: undefined
|
1524
|
+
};
|
1525
|
+
|
1526
|
+
/*************************************************************************
|
1527
|
+
* widget $(..).dynatree
|
1528
|
+
*/
|
1529
|
+
|
1530
|
+
$.widget("ui.dynatree", {
|
1531
|
+
init: function() {
|
1532
|
+
// ui.core 1.6 renamed init() to _init(): this stub assures backward compatibility
|
1533
|
+
_log("warn", "ui.dynatree.init() was called; you should upgrade to ui.core.js v1.6 or higher.");
|
1534
|
+
return this._init();
|
1535
|
+
},
|
1536
|
+
|
1537
|
+
_init: function() {
|
1538
|
+
logMsg("Dynatree._init(): version='%s', debugLevel=%o.", DynaTree.version, this.options.debugLevel);
|
1539
|
+
|
1540
|
+
// The widget framework supplies this.element and this.options.
|
1541
|
+
this.options.event += ".dynatree"; // namespace event
|
1542
|
+
|
1543
|
+
var $this = this.element;
|
1544
|
+
var opts = this.options;
|
1545
|
+
|
1546
|
+
// Guess skin path, if not specified
|
1547
|
+
if(!opts.imagePath) {
|
1548
|
+
$("script").each( function () {
|
1549
|
+
// TODO: eclipse syntax parser breaks on this expression:
|
1550
|
+
if( this.src.search(/.*dynatree[^/]*\.js$/i) >= 0 ) {
|
1551
|
+
if( this.src.indexOf("/")>=0 ) // issue #47
|
1552
|
+
opts.imagePath = this.src.slice(0, this.src.lastIndexOf("/")) + "/skin/";
|
1553
|
+
else
|
1554
|
+
opts.imagePath = "skin/";
|
1555
|
+
// logMsg("Guessing imagePath from '%s': '%s'", this.src, opts.imagePath);
|
1556
|
+
return false; // first match
|
1557
|
+
}
|
1558
|
+
});
|
1559
|
+
}
|
1560
|
+
// Attach the tree object to parent element
|
1561
|
+
var divContainer = $this.get(0);
|
1562
|
+
|
1563
|
+
// Clear container, in case it contained some 'waiting' or 'error' text
|
1564
|
+
// for clients that don't support JS
|
1565
|
+
if( opts.children || (opts.initAjax && opts.initAjax.url) || opts.initId )
|
1566
|
+
$(divContainer).empty();
|
1567
|
+
|
1568
|
+
// Create the DynaTree object
|
1569
|
+
this.tree = new DynaTree(divContainer, opts);
|
1570
|
+
var root = this.tree.getRoot();
|
1571
|
+
|
1572
|
+
var isReloading = ( opts.persist && this.tree.persistence.isReloading() );
|
1573
|
+
var isLazy = false;
|
1574
|
+
|
1575
|
+
var prevFlag = this.tree.enableUpdate(false);
|
1576
|
+
|
1577
|
+
this.tree.logDebug("Dynatree._init(): read tree structure...");
|
1578
|
+
|
1579
|
+
// Init tree structure
|
1580
|
+
if( opts.children ) {
|
1581
|
+
// Read structure from node array
|
1582
|
+
root.append(opts.children);
|
1583
|
+
|
1584
|
+
} else if( opts.initAjax && opts.initAjax.url ) {
|
1585
|
+
// Init tree from AJAX request
|
1586
|
+
isLazy = true;
|
1587
|
+
var ajaxOpts = $.extend({}, opts.initAjax);
|
1588
|
+
// Append cookie info to the request
|
1589
|
+
if( ajaxOpts.addActiveKey )
|
1590
|
+
ajaxOpts.data.activeKey = this.tree.persistence.activeKey;
|
1591
|
+
if( ajaxOpts.addFocusedKey )
|
1592
|
+
ajaxOpts.data.focusedKey = this.tree.persistence.focusedKey;
|
1593
|
+
if( ajaxOpts.addExpandedKeyList )
|
1594
|
+
ajaxOpts.data.expandedKeyList = this.tree.persistence.expandedKeyList.join(",");
|
1595
|
+
if( ajaxOpts.addSelectedKeyList )
|
1596
|
+
ajaxOpts.data.selectedKeyList = this.tree.persistence.selectedKeyList.join(",");
|
1597
|
+
|
1598
|
+
// Setup onPostInit callback to be called when Ajax returns
|
1599
|
+
if( opts.onPostInit ) {
|
1600
|
+
if( ajaxOpts.success )
|
1601
|
+
this.tree.logWarning("initAjax: success callback is ignored when onPostInit was specified.");
|
1602
|
+
if( ajaxOpts.error )
|
1603
|
+
this.tree.logWarning("initAjax: error callback is ignored when onPostInit was specified.");
|
1604
|
+
ajaxOpts["success"] = function(dtnode) { opts.onPostInit.call(dtnode.tree, isReloading, false); };
|
1605
|
+
ajaxOpts["error"] = function(dtnode) { opts.onPostInit.call(dtnode.tree, isReloading, true); };
|
1606
|
+
}
|
1607
|
+
this.tree.logDebug("Dynatree._init(): send Ajax request...");
|
1608
|
+
root.appendAjax(ajaxOpts);
|
1609
|
+
|
1610
|
+
} else if( opts.initId ) {
|
1611
|
+
// Init tree from another UL element
|
1612
|
+
this.tree._createFromTag(root, $("#"+opts.initId));
|
1613
|
+
|
1614
|
+
} else {
|
1615
|
+
// Init tree from the first UL element inside the container <div>
|
1616
|
+
var $ul = $this.find(">ul").hide();
|
1617
|
+
this.tree._createFromTag(root, $ul);
|
1618
|
+
$ul.remove();
|
1619
|
+
}
|
1620
|
+
|
1621
|
+
this.tree._checkConsistency();
|
1622
|
+
// Render html markup
|
1623
|
+
this.tree.logDebug("Dynatree._init(): render nodes...");
|
1624
|
+
this.tree.enableUpdate(prevFlag);
|
1625
|
+
|
1626
|
+
// bind event handlers
|
1627
|
+
this.tree.logDebug("Dynatree._init(): bind events...");
|
1628
|
+
this.bind();
|
1629
|
+
|
1630
|
+
// --- Post-load processing
|
1631
|
+
this.tree.logDebug("Dynatree._init(): postInit...");
|
1632
|
+
this.tree.phase = "postInit";
|
1633
|
+
|
1634
|
+
// In persist mode, make sure that cookies are written, even if they are empty
|
1635
|
+
if( opts.persist ) {
|
1636
|
+
this.tree.persistence.write();
|
1637
|
+
}
|
1638
|
+
|
1639
|
+
// Set focus, if possible (this will also fire an event and write a cookie)
|
1640
|
+
if( this.tree.focusNode && this.tree.focusNode.isVisible() ) {
|
1641
|
+
this.tree.logDebug("Focus on init: %o", this.tree.focusNode);
|
1642
|
+
this.tree.focusNode.focus();
|
1643
|
+
}
|
1644
|
+
|
1645
|
+
if( !isLazy && opts.onPostInit ) {
|
1646
|
+
opts.onPostInit.call(this.tree, isReloading, false);
|
1647
|
+
}
|
1648
|
+
|
1649
|
+
this.tree.logDebug("Dynatree._init(): done.");
|
1650
|
+
|
1651
|
+
// this.tree.phase = isLazy ? "waiting" : "idle";
|
1652
|
+
this.tree.phase = "idle";
|
1653
|
+
},
|
1654
|
+
|
1655
|
+
bind: function() {
|
1656
|
+
var $this = this.element;
|
1657
|
+
var o = this.options;
|
1658
|
+
|
1659
|
+
// Prevent duplicate binding
|
1660
|
+
this.unbind();
|
1661
|
+
|
1662
|
+
// Tool function to get dtnode from the event target:
|
1663
|
+
function __getNodeFromElement(el) {
|
1664
|
+
var iMax = 4;
|
1665
|
+
do {
|
1666
|
+
if( el.dtnode ) return el.dtnode;
|
1667
|
+
el = el.parentNode;
|
1668
|
+
} while( iMax-- );
|
1669
|
+
return null;
|
1670
|
+
}
|
1671
|
+
|
1672
|
+
var eventNames = "click.dynatree dblclick.dynatree";
|
1673
|
+
if( o.keyboard ) // Note: leading ' '!
|
1674
|
+
eventNames += " keypress.dynatree keydown.dynatree";
|
1675
|
+
$this.bind(eventNames, function(event){
|
1676
|
+
var dtnode = __getNodeFromElement(event.target);
|
1677
|
+
if( !dtnode )
|
1678
|
+
return true; // Allow bubbling of other events
|
1679
|
+
var prevPhase = dtnode.tree.phase;
|
1680
|
+
dtnode.tree.phase = "userEvent";
|
1681
|
+
try {
|
1682
|
+
dtnode.tree.logDebug("bind(%o): dtnode: %o", event, dtnode);
|
1683
|
+
|
1684
|
+
switch(event.type) {
|
1685
|
+
case "click":
|
1686
|
+
return ( o.onClick && o.onClick(dtnode, event)===false ) ? false : dtnode.onClick(event);
|
1687
|
+
case "dblclick":
|
1688
|
+
return ( o.onDblClick && o.onDblClick(dtnode, event)===false ) ? false : dtnode.onDblClick(event);
|
1689
|
+
case "keydown":
|
1690
|
+
return ( o.onKeydown && o.onKeydown(dtnode, event)===false ) ? false : dtnode.onKeydown(event);
|
1691
|
+
case "keypress":
|
1692
|
+
return ( o.onKeypress && o.onKeypress(dtnode, event)===false ) ? false : dtnode.onKeypress(event);
|
1693
|
+
};
|
1694
|
+
// } catch(e) {
|
1695
|
+
// dtnode.tree.logError("bind(%o): dtnode: %o", event, dtnode);
|
1696
|
+
} finally {
|
1697
|
+
dtnode.tree.phase = prevPhase;
|
1698
|
+
}
|
1699
|
+
});
|
1700
|
+
|
1701
|
+
// focus/blur don't bubble, i.e. are not delegated to parent <div> tags,
|
1702
|
+
// so we use the addEventListener capturing phase.
|
1703
|
+
// See http://www.howtocreate.co.uk/tutorials/javascript/domevents
|
1704
|
+
function __focusHandler(event) {
|
1705
|
+
// Handles blur and focus.
|
1706
|
+
// Fix event for IE:
|
1707
|
+
event = arguments[0] = $.event.fix( event || window.event );
|
1708
|
+
var dtnode = __getNodeFromElement(event.target);
|
1709
|
+
return dtnode ? dtnode.onFocus(event) : false;
|
1710
|
+
}
|
1711
|
+
var div = this.tree.divTree;
|
1712
|
+
if( div.addEventListener ) {
|
1713
|
+
div.addEventListener("focus", __focusHandler, true);
|
1714
|
+
div.addEventListener("blur", __focusHandler, true);
|
1715
|
+
} else {
|
1716
|
+
div.onfocusin = div.onfocusout = __focusHandler;
|
1717
|
+
}
|
1718
|
+
// EVENTS
|
1719
|
+
// disable click if event is configured to something else
|
1720
|
+
// if (!(/^click/).test(o.event))
|
1721
|
+
// this.$tabs.bind("click.tabs", function() { return false; });
|
1722
|
+
|
1723
|
+
},
|
1724
|
+
|
1725
|
+
unbind: function() {
|
1726
|
+
this.element.unbind(".dynatree");
|
1727
|
+
},
|
1728
|
+
|
1729
|
+
/* TODO: we could handle option changes during runtime here (maybe to re-render, ...)
|
1730
|
+
setData: function(key, value) {
|
1731
|
+
this.tree.logDebug("dynatree.setData('" + key + "', '" + value + "')");
|
1732
|
+
},
|
1733
|
+
*/
|
1734
|
+
enable: function() {
|
1735
|
+
this.bind();
|
1736
|
+
// Call default disable(): remove -disabled from css:
|
1737
|
+
$.widget.prototype.enable.apply(this, arguments);
|
1738
|
+
},
|
1739
|
+
|
1740
|
+
disable: function() {
|
1741
|
+
this.unbind();
|
1742
|
+
// Call default disable(): add -disabled to css:
|
1743
|
+
$.widget.prototype.disable.apply(this, arguments);
|
1744
|
+
},
|
1745
|
+
|
1746
|
+
// --- getter methods (i.e. NOT returning a reference to $)
|
1747
|
+
getTree: function() {
|
1748
|
+
return this.tree;
|
1749
|
+
},
|
1750
|
+
|
1751
|
+
getRoot: function() {
|
1752
|
+
return this.tree.getRoot();
|
1753
|
+
},
|
1754
|
+
|
1755
|
+
getActiveNode: function() {
|
1756
|
+
return this.tree.getActiveNode();
|
1757
|
+
},
|
1758
|
+
|
1759
|
+
getSelectedNodes: function() {
|
1760
|
+
return this.tree.getSelectedNodes();
|
1761
|
+
},
|
1762
|
+
|
1763
|
+
// ------------------------------------------------------------------------
|
1764
|
+
lastentry: undefined
|
1765
|
+
});
|
1766
|
+
|
1767
|
+
|
1768
|
+
// The following methods return a value (thus breaking the jQuery call chain):
|
1769
|
+
|
1770
|
+
$.ui.dynatree.getter = "getTree getRoot getActiveNode getSelectedNodes";
|
1771
|
+
|
1772
|
+
|
1773
|
+
// Plugin default options:
|
1774
|
+
|
1775
|
+
$.ui.dynatree.defaults = {
|
1776
|
+
title: "Dynatree root", // Name of the root node.
|
1777
|
+
rootVisible: false, // Set to true, to make the root node visible.
|
1778
|
+
minExpandLevel: 1, // 1: root node is not collapsible
|
1779
|
+
imagePath: null, // Path to a folder containing icons. Defaults to 'skin/' subdirectory.
|
1780
|
+
children: null, // Init tree structure from this object array.
|
1781
|
+
initId: null, // Init tree structure from a <ul> element with this ID.
|
1782
|
+
initAjax: null, // Ajax options used to initialize the tree strucuture.
|
1783
|
+
autoFocus: true, // Set focus to first child, when expanding or lazy-loading.
|
1784
|
+
keyboard: true, // Support keyboard navigation.
|
1785
|
+
persist: false, // Persist expand-status to a cookie
|
1786
|
+
autoCollapse: false, // Automatically collapse all siblings, when a node is expanded.
|
1787
|
+
clickFolderMode: 3, // 1:activate, 2:expand, 3:activate and expand
|
1788
|
+
activeVisible: true, // Make sure, active nodes are visible (expanded).
|
1789
|
+
checkbox: false, // Show checkboxes.
|
1790
|
+
selectMode: 2, // 1:single, 2:multi, 3:multi-hier
|
1791
|
+
fx: null, // Animations, e.g. null or { height: "toggle", duration: 200 }
|
1792
|
+
|
1793
|
+
// Low level event handlers: onEvent(dtnode, event): return false, to stop default processing
|
1794
|
+
onClick: null, // null: generate focus, expand, activate, select events.
|
1795
|
+
onDblClick: null, // (No default actions.)
|
1796
|
+
onKeydown: null, // null: generate keyboard navigation (focus, expand, activate).
|
1797
|
+
onKeypress: null, // (No default actions.)
|
1798
|
+
onFocus: null, // null: set focus to node.
|
1799
|
+
onBlur: null, // null: remove focus from node.
|
1800
|
+
|
1801
|
+
// Pre-event handlers onQueryEvent(flag, dtnode): return false, to stop processing
|
1802
|
+
onQueryActivate: null, // Callback(flag, dtnode) before a node is (de)activated.
|
1803
|
+
onQuerySelect: null, // Callback(flag, dtnode) before a node is (de)selected.
|
1804
|
+
onQueryExpand: null, // Callback(flag, dtnode) before a node is expanded/collpsed.
|
1805
|
+
|
1806
|
+
// High level event handlers
|
1807
|
+
onPostInit: null, // Callback(isReloading, isError) when tree was (re)loaded.
|
1808
|
+
onActivate: null, // Callback(dtnode) when a node is activated.
|
1809
|
+
onDeactivate: null, // Callback(dtnode) when a node is deactivated.
|
1810
|
+
onSelect: null, // Callback(flag, dtnode) when a node is (de)selected.
|
1811
|
+
onExpand: null, // Callback(dtnode) when a node is expanded/collapsed.
|
1812
|
+
onLazyRead: null, // Callback(dtnode) when a lazy node is expanded for the first time.
|
1813
|
+
|
1814
|
+
ajaxDefaults: { // Used by initAjax option
|
1815
|
+
cache: false, // false: Append random '_' argument to the request url to prevent caching.
|
1816
|
+
dataType: "json" // Expect json format and pass json object to callbacks.
|
1817
|
+
},
|
1818
|
+
strings: {
|
1819
|
+
loading: "Loading…",
|
1820
|
+
loadError: "Load error!"
|
1821
|
+
},
|
1822
|
+
idPrefix: "ui-dynatree-id-", // Used to generate node id's like <span id="ui-dynatree-id-<key>">.
|
1823
|
+
// cookieId: "ui-dynatree-cookie", // Choose a more unique name, to allow multiple trees.
|
1824
|
+
cookieId: "dynatree", // Choose a more unique name, to allow multiple trees.
|
1825
|
+
cookie: {
|
1826
|
+
expires: null //7, // Days or Date; null: session cookie
|
1827
|
+
// path: "/", // Defaults to current page
|
1828
|
+
// domain: "jquery.com",
|
1829
|
+
// secure: true
|
1830
|
+
},
|
1831
|
+
|
1832
|
+
classNames: {
|
1833
|
+
container: "ui-dynatree-container",
|
1834
|
+
folder: "ui-dynatree-folder",
|
1835
|
+
document: "ui-dynatree-document",
|
1836
|
+
|
1837
|
+
empty: "ui-dynatree-empty",
|
1838
|
+
vline: "ui-dynatree-vline",
|
1839
|
+
expander: "ui-dynatree-expander",
|
1840
|
+
connector: "ui-dynatree-connector",
|
1841
|
+
checkbox: "ui-dynatree-checkbox",
|
1842
|
+
nodeIcon: "ui-dynatree-icon",
|
1843
|
+
title: "ui-dynatree-title",
|
1844
|
+
|
1845
|
+
nodeError: "ui-dynatree-statusnode-error",
|
1846
|
+
nodeWait: "ui-dynatree-statusnode-wait",
|
1847
|
+
hidden: "ui-dynatree-hidden",
|
1848
|
+
combinedExpanderPrefix: "ui-dynatree-exp-",
|
1849
|
+
combinedIconPrefix: "ui-dynatree-ico-",
|
1850
|
+
// disabled: "ui-dynatree-disabled",
|
1851
|
+
// hasChildren: "ui-dynatree-has-children",
|
1852
|
+
active: "ui-dynatree-active",
|
1853
|
+
selected: "ui-dynatree-selected",
|
1854
|
+
expanded: "ui-dynatree-expanded",
|
1855
|
+
lazy: "ui-dynatree-lazy",
|
1856
|
+
focused: "ui-dynatree-focused",
|
1857
|
+
partsel: "ui-dynatree-partsel",
|
1858
|
+
lastsib: "ui-dynatree-lastsib"
|
1859
|
+
},
|
1860
|
+
debugLevel: 1,
|
1861
|
+
|
1862
|
+
// ------------------------------------------------------------------------
|
1863
|
+
lastentry: undefined
|
1864
|
+
};
|
1865
|
+
|
1866
|
+
/**
|
1867
|
+
* Reserved data attributes for a tree node.
|
1868
|
+
*/
|
1869
|
+
$.ui.dynatree.nodedatadefaults = {
|
1870
|
+
title: null, // (required) Displayed name of the node (html is allowed here)
|
1871
|
+
key: null, // May be used with activate(), select(), find(), ...
|
1872
|
+
isFolder: false, // Use a folder icon. Also the node is expandable but not selectable.
|
1873
|
+
isLazy: false, // Call onLazyRead(), when the node is expanded for the first time to allow for delayed creation of children.
|
1874
|
+
tooltip: null, // Show this popup text.
|
1875
|
+
icon: null, // Use a custom image (filename relative to tree.options.imagePath). 'null' for default icon, 'false' for no icon.
|
1876
|
+
addClass: null, // Class name added to the node's span tag.
|
1877
|
+
activate: false, // Initial active status.
|
1878
|
+
focus: false, // Initial focused status.
|
1879
|
+
expand: false, // Initial expanded status.
|
1880
|
+
select: false, // Initial selected status.
|
1881
|
+
// hideCheckbox: null, // Suppress checkbox for this node.
|
1882
|
+
// unselectable: false, // Prevent selection.
|
1883
|
+
// disabled: null,
|
1884
|
+
// The following attributes are only valid if passed to some functions:
|
1885
|
+
children: null, // Array of child nodes.
|
1886
|
+
// NOTE: we can also add custom attributes here.
|
1887
|
+
// This may then also be used in the onActivate(), onSelect() or onLazyTree() callbacks.
|
1888
|
+
// ------------------------------------------------------------------------
|
1889
|
+
lastentry: undefined
|
1890
|
+
};
|
1891
|
+
|
1892
|
+
|
1893
|
+
// ---------------------------------------------------------------------------
|
1894
|
+
})(jQuery);
|