compass-jquery-plugin 0.2.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.textile +122 -0
- data/Rakefile +9 -0
- data/lib/handle_js_files.rb +24 -0
- data/lib/jquery/calendar.rb +5 -0
- data/lib/jquery/compass_plugin.rb +5 -0
- data/lib/jquery/dynatree.rb +5 -0
- data/lib/jquery/jqgrid.rb +380 -0
- data/lib/jquery/jrails.rb +427 -0
- data/lib/jquery/rubygems.rake +41 -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 +220 -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/secret_sauce.rb +10 -0
- data/lib/jquery/version.rb +13 -0
- data/lib/jquery.rb +1 -0
- data/lib/yuicompressor-2.4.2.jar +0 -0
- data/templates/calendar/config/initializers/calendar.rb +3 -0
- data/templates/calendar/jquery.calendar.js +2047 -0
- data/templates/calendar/jquery.calendar.min.js +11 -0
- data/templates/calendar/jquery.ui/calendar.sass +288 -0
- data/templates/calendar/manifest.rb +7 -0
- data/templates/dynatree/config/initializers/dynatree.rb +3 -0
- data/templates/dynatree/jquery.dynatree.js +1975 -0
- data/templates/dynatree/jquery.dynatree.min.js +1 -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.aqua/rbChecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/rbChecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/rbIntermediate.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/rbIntermediate_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/rbUnchecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua/rbUnchecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.aqua.sass +177 -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.crystal/rbChecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/rbChecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/rbIntermediate.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/rbIntermediate_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/rbUnchecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal/rbUnchecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.crystal.sass +177 -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.vista/rbChecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/rbChecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/rbIntermediate.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/rbIntermediate_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/rbUnchecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista/rbUnchecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.vista.sass +177 -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/jquery.ui/dynatree.xp/rbChecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/rbChecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/rbIntermediate.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/rbIntermediate_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/rbUnchecked.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/rbUnchecked_hover.png +0 -0
- data/templates/dynatree/jquery.ui/dynatree.xp/ui.dynatree.css +287 -0
- data/templates/dynatree/jquery.ui/dynatree.xp.sass +178 -0
- data/templates/dynatree/manifest.rb +129 -0
- data/templates/jqgrid/config/initializers/jqgrid.rb +3 -0
- data/templates/jqgrid/config/locales/jquery/jqgrid/de.yml +7 -0
- data/templates/jqgrid/config/locales/jquery/jqgrid/en.yml +7 -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-nl.js +145 -0
- data/templates/jqgrid/i18n/jqgrid/locale-nl.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 +8988 -0
- data/templates/jqgrid/jquery.jqGrid.min.js +1 -0
- data/templates/jqgrid/jquery.ui/jqGrid.sass +580 -0
- data/templates/jqgrid/manifest.rb +57 -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-ui.js +18367 -0
- data/templates/jrails/jquery-ui.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/_theme.sass +1462 -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/base.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/black-tie.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/blitzer.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/cupertino.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/dark-hive.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/dot-luv.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/eggplant.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/excite-bike.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/flick.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/hot-sneaks.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/humanity.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/le-frog.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/mint-choc.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/overcast.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/pepper-grinder.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/redmond.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/smoothness.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/south-street.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/sunny.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/swanky-purse.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/trontastic.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-darkness.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/ui-lightness.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/jquery.ui/vader.sass +85 -0
- data/templates/jrails/jrails.js +197 -0
- data/templates/jrails/jrails.min.js +1 -0
- data/templates/jrails/manifest.rb +457 -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.js.haml +136 -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 +734 -0
@@ -0,0 +1,1975 @@
|
|
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.1$
|
14
|
+
$Revision: 279, 2009-08-16 21:08:44$
|
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
|
+
_fixOrder: function() {
|
188
|
+
/**
|
189
|
+
* Make sure, that <div> order matches childList order.
|
190
|
+
*/
|
191
|
+
var cl = this.childList;
|
192
|
+
if( !cl )
|
193
|
+
return;
|
194
|
+
var childDiv = this.div.firstChild.nextSibling;
|
195
|
+
for(var i=0; i<cl.length-1; i++) {
|
196
|
+
var childNode1 = cl[i];
|
197
|
+
var childNode2 = childDiv.firstChild.dtnode;
|
198
|
+
if( childNode1 !== childNode2 ) {
|
199
|
+
//
|
200
|
+
this.tree.logDebug("_fixOrder: mismatch at index " + i + ": " + childNode1 + " != " + childNode2);
|
201
|
+
this.div.insertBefore(childNode1.div, childNode2.div);
|
202
|
+
} else {
|
203
|
+
childDiv = childDiv.nextSibling;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
},
|
207
|
+
|
208
|
+
render: function(bDeep, bHidden) {
|
209
|
+
/**
|
210
|
+
* Create HTML markup for this node.
|
211
|
+
*
|
212
|
+
* <div> // This div contains the node's span and list of child div's.
|
213
|
+
* <span id='key'>S S S A</span> // Span contains graphic spans and title <a> tag
|
214
|
+
* <div>child1</div>
|
215
|
+
* <div>child2</div>
|
216
|
+
* </div>
|
217
|
+
*/
|
218
|
+
// this.tree.logDebug("%o.render()", this);
|
219
|
+
var opts = this.tree.options;
|
220
|
+
var cn = opts.classNames;
|
221
|
+
var isLastSib = this.isLastSibling();
|
222
|
+
// ---
|
223
|
+
if( ! this.div ) {
|
224
|
+
this.span = document.createElement("span");
|
225
|
+
this.span.dtnode = this;
|
226
|
+
if( this.data.key )
|
227
|
+
this.span.id = this.tree.options.idPrefix + this.data.key;
|
228
|
+
this.div = document.createElement("div");
|
229
|
+
this.div.appendChild(this.span);
|
230
|
+
|
231
|
+
if ( this.parent ) {
|
232
|
+
this.parent.div.appendChild(this.div);
|
233
|
+
}
|
234
|
+
|
235
|
+
if( this.parent==null && !this.tree.options.rootVisible )
|
236
|
+
this.span.style.display = "none";
|
237
|
+
}
|
238
|
+
// set node connector images, links and text
|
239
|
+
this.span.innerHTML = this._getInnerHtml();
|
240
|
+
|
241
|
+
// hide this node, if parent is collapsed
|
242
|
+
this.div.style.display = ( this.parent==null || this.parent.bExpanded ? "" : "none");
|
243
|
+
|
244
|
+
// Set classes for current status
|
245
|
+
var cnList = [];
|
246
|
+
cnList.push( ( this.data.isFolder ) ? cn.folder : cn.document );
|
247
|
+
if( this.bExpanded )
|
248
|
+
cnList.push(cn.expanded);
|
249
|
+
if( this.childList != null )
|
250
|
+
cnList.push(cn.hasChildren);
|
251
|
+
if( this.data.isLazy && this.childList==null )
|
252
|
+
cnList.push(cn.lazy);
|
253
|
+
if( isLastSib )
|
254
|
+
cnList.push(cn.lastsib);
|
255
|
+
if( this.bSelected )
|
256
|
+
cnList.push(cn.selected);
|
257
|
+
if( this.hasSubSel )
|
258
|
+
cnList.push(cn.partsel);
|
259
|
+
if( this.tree.activeNode === this )
|
260
|
+
cnList.push(cn.active);
|
261
|
+
if( this.data.addClass )
|
262
|
+
cnList.push(this.data.addClass);
|
263
|
+
// IE6 doesn't correctly evaluate multiple class names,
|
264
|
+
// so we create combined class names that can be used in the CSS
|
265
|
+
cnList.push(cn.combinedExpanderPrefix
|
266
|
+
+ (this.bExpanded ? "e" : "c")
|
267
|
+
+ (this.data.isLazy && this.childList==null ? "d" : "")
|
268
|
+
+ (isLastSib ? "l" : "")
|
269
|
+
);
|
270
|
+
cnList.push(cn.combinedIconPrefix
|
271
|
+
+ (this.bExpanded ? "e" : "c")
|
272
|
+
+ (this.data.isFolder ? "f" : "")
|
273
|
+
);
|
274
|
+
this.span.className = cnList.join(" ");
|
275
|
+
|
276
|
+
if( bDeep && this.childList && (bHidden || this.bExpanded) ) {
|
277
|
+
for(var i=0; i<this.childList.length; i++) {
|
278
|
+
this.childList[i].render(bDeep, bHidden)
|
279
|
+
}
|
280
|
+
this._fixOrder();
|
281
|
+
}
|
282
|
+
},
|
283
|
+
|
284
|
+
hasChildren: function() {
|
285
|
+
return this.childList != null;
|
286
|
+
},
|
287
|
+
|
288
|
+
isLastSibling: function() {
|
289
|
+
var p = this.parent;
|
290
|
+
if ( !p ) return true;
|
291
|
+
return p.childList[p.childList.length-1] === this;
|
292
|
+
},
|
293
|
+
|
294
|
+
prevSibling: function() {
|
295
|
+
if( !this.parent ) return null;
|
296
|
+
var ac = this.parent.childList;
|
297
|
+
for(var i=1; i<ac.length; i++) // start with 1, so prev(first) = null
|
298
|
+
if( ac[i] === this )
|
299
|
+
return ac[i-1];
|
300
|
+
return null;
|
301
|
+
},
|
302
|
+
|
303
|
+
nextSibling: function() {
|
304
|
+
if( !this.parent ) return null;
|
305
|
+
var ac = this.parent.childList;
|
306
|
+
for(var i=0; i<ac.length-1; i++) // up to length-2, so next(last) = null
|
307
|
+
if( ac[i] === this )
|
308
|
+
return ac[i+1];
|
309
|
+
return null;
|
310
|
+
},
|
311
|
+
|
312
|
+
_setStatusNode: function(data) {
|
313
|
+
// Create, modify or remove the status child node (pass 'null', to remove it).
|
314
|
+
var firstChild = ( this.childList ? this.childList[0] : null );
|
315
|
+
if( !data ) {
|
316
|
+
if ( firstChild ) {
|
317
|
+
this.div.removeChild(firstChild.div);
|
318
|
+
if( this.childList.length == 1 )
|
319
|
+
this.childList = null;
|
320
|
+
else
|
321
|
+
this.childList.shift();
|
322
|
+
}
|
323
|
+
} else if ( firstChild ) {
|
324
|
+
data.isStatusNode = true;
|
325
|
+
firstChild.data = data;
|
326
|
+
firstChild.render(false, false);
|
327
|
+
} else {
|
328
|
+
data.isStatusNode = true;
|
329
|
+
firstChild = this.addChild(data);
|
330
|
+
}
|
331
|
+
},
|
332
|
+
|
333
|
+
setLazyNodeStatus: function(lts) {
|
334
|
+
switch( lts ) {
|
335
|
+
case DTNodeStatus_Ok:
|
336
|
+
this._setStatusNode(null);
|
337
|
+
// this.isRead = true;
|
338
|
+
this.isLoading = false;
|
339
|
+
this.render(false, false);
|
340
|
+
if( this.tree.options.autoFocus ) {
|
341
|
+
if( this === this.tree.tnRoot && !this.tree.options.rootVisible && this.childList ) {
|
342
|
+
// special case: using ajaxInit
|
343
|
+
this.childList[0].focus();
|
344
|
+
} else {
|
345
|
+
this.focus();
|
346
|
+
}
|
347
|
+
}
|
348
|
+
break;
|
349
|
+
case DTNodeStatus_Loading:
|
350
|
+
this.isLoading = true;
|
351
|
+
this._setStatusNode({
|
352
|
+
title: this.tree.options.strings.loading,
|
353
|
+
addClass: this.tree.options.classNames.nodeWait
|
354
|
+
});
|
355
|
+
break;
|
356
|
+
case DTNodeStatus_Error:
|
357
|
+
this.isLoading = false;
|
358
|
+
this._setStatusNode({
|
359
|
+
title: this.tree.options.strings.loadError,
|
360
|
+
addClass: this.tree.options.classNames.nodeError
|
361
|
+
});
|
362
|
+
break;
|
363
|
+
default:
|
364
|
+
throw "Bad LazyNodeStatus: '" + lts + "'.";
|
365
|
+
}
|
366
|
+
},
|
367
|
+
|
368
|
+
_parentList: function(includeRoot, includeSelf) {
|
369
|
+
var l = [];
|
370
|
+
var dtn = includeSelf ? this : this.parent;
|
371
|
+
while( dtn ) {
|
372
|
+
if( includeRoot || dtn.parent )
|
373
|
+
l.unshift(dtn);
|
374
|
+
dtn = dtn.parent;
|
375
|
+
};
|
376
|
+
return l;
|
377
|
+
},
|
378
|
+
|
379
|
+
getLevel: function() {
|
380
|
+
var level = 0;
|
381
|
+
var dtn = this.parent;
|
382
|
+
while( dtn ) {
|
383
|
+
level++;
|
384
|
+
dtn = dtn.parent;
|
385
|
+
};
|
386
|
+
return level;
|
387
|
+
},
|
388
|
+
|
389
|
+
_getTypeForOuterNodeEvent: function(event) {
|
390
|
+
/** Return the inner node span (title, checkbox or expander) if
|
391
|
+
* event.target points to the outer span.
|
392
|
+
* This function should fix issue #93:
|
393
|
+
* FF2 ignores empty spans, when generating events (returning the parent instead).
|
394
|
+
*/
|
395
|
+
var cns = this.tree.options.classNames;
|
396
|
+
var target = event.target;
|
397
|
+
// Only process clicks on an outer node span (probably due to a FF2 event handling bug)
|
398
|
+
if( target.className.indexOf(cns.folder)<0
|
399
|
+
&& target.className.indexOf(cns.document)<0 ) {
|
400
|
+
return null
|
401
|
+
}
|
402
|
+
// Event coordinates, relative to outer node span:
|
403
|
+
var eventX = event.pageX - target.offsetLeft;
|
404
|
+
var eventY = event.pageY - target.offsetTop;
|
405
|
+
|
406
|
+
for(var i=0; i<target.childNodes.length; i++) {
|
407
|
+
var cn = target.childNodes[i];
|
408
|
+
var x = cn.offsetLeft - target.offsetLeft;
|
409
|
+
var y = cn.offsetTop - target.offsetTop;
|
410
|
+
var nx = cn.clientWidth, ny = cn.clientHeight;
|
411
|
+
// alert (cn.className + ": " + x + ", " + y + ", s:" + nx + ", " + ny);
|
412
|
+
if( eventX>=x && eventX<=(x+nx) && eventY>=y && eventY<=(y+ny) ) {
|
413
|
+
// alert("HIT "+ cn.className);
|
414
|
+
if( cn.className==cns.title )
|
415
|
+
return "title";
|
416
|
+
else if( cn.className==cns.expander )
|
417
|
+
return "expander";
|
418
|
+
else if( cn.className==cns.checkbox )
|
419
|
+
return "checkbox";
|
420
|
+
else if( cn.className==cns.nodeIcon )
|
421
|
+
return "icon";
|
422
|
+
}
|
423
|
+
}
|
424
|
+
return "prefix";
|
425
|
+
},
|
426
|
+
|
427
|
+
getEventTargetType: function(event) {
|
428
|
+
// Return the part of a node, that a click event occured on.
|
429
|
+
// Note: there is no check, if the was fired on TIHS node.
|
430
|
+
var tcn = event && event.target ? event.target.className : "";
|
431
|
+
var cns = this.tree.options.classNames;
|
432
|
+
|
433
|
+
if( tcn == cns.title )
|
434
|
+
return "title";
|
435
|
+
else if( tcn==cns.expander )
|
436
|
+
return "expander";
|
437
|
+
else if( tcn==cns.checkbox )
|
438
|
+
return "checkbox";
|
439
|
+
else if( tcn==cns.nodeIcon )
|
440
|
+
return "icon";
|
441
|
+
else if( tcn==cns.empty || tcn==cns.vline || tcn==cns.connector )
|
442
|
+
return "prefix";
|
443
|
+
else if( tcn.indexOf(cns.folder)>=0 || tcn.indexOf(cns.document)>=0 )
|
444
|
+
// FIX issue #93
|
445
|
+
return this._getTypeForOuterNodeEvent(event);
|
446
|
+
return null;
|
447
|
+
},
|
448
|
+
|
449
|
+
isVisible: function() {
|
450
|
+
// Return true, if all parents are expanded.
|
451
|
+
var parents = this._parentList(true, false);
|
452
|
+
for(var i=0; i<parents.length; i++)
|
453
|
+
if( ! parents[i].bExpanded ) return false;
|
454
|
+
return true;
|
455
|
+
},
|
456
|
+
|
457
|
+
makeVisible: function() {
|
458
|
+
// Make sure, all parents are expanded
|
459
|
+
var parents = this._parentList(true, false);
|
460
|
+
for(var i=0; i<parents.length; i++)
|
461
|
+
parents[i]._expand(true);
|
462
|
+
},
|
463
|
+
|
464
|
+
focus: function() {
|
465
|
+
// TODO: check, if we already have focus
|
466
|
+
// this.tree.logDebug("dtnode.focus(): %o", this);
|
467
|
+
this.makeVisible();
|
468
|
+
try {
|
469
|
+
$(this.span).find(">a").focus();
|
470
|
+
} catch(e) { }
|
471
|
+
},
|
472
|
+
|
473
|
+
_activate: function(flag, fireEvents) {
|
474
|
+
// (De)Activate - but not focus - this node.
|
475
|
+
this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o", flag, fireEvents, this);
|
476
|
+
var opts = this.tree.options;
|
477
|
+
if( this.data.isStatusNode )
|
478
|
+
return;
|
479
|
+
if ( fireEvents && opts.onQueryActivate && opts.onQueryActivate.call(this.span, flag, this) == false )
|
480
|
+
return; // Callback returned false
|
481
|
+
|
482
|
+
if( flag ) {
|
483
|
+
// Activate
|
484
|
+
if( this.tree.activeNode ) {
|
485
|
+
if( this.tree.activeNode === this )
|
486
|
+
return;
|
487
|
+
this.tree.activeNode.deactivate();
|
488
|
+
}
|
489
|
+
if( opts.activeVisible )
|
490
|
+
this.makeVisible();
|
491
|
+
this.tree.activeNode = this;
|
492
|
+
if( opts.persist )
|
493
|
+
$.cookie(opts.cookieId+"-active", this.data.key, opts.cookie);
|
494
|
+
$(this.span).addClass(opts.classNames.active);
|
495
|
+
if ( fireEvents && opts.onActivate ) // Pass element as 'this' (jQuery convention)
|
496
|
+
opts.onActivate.call(this.span, this);
|
497
|
+
} else {
|
498
|
+
// Deactivate
|
499
|
+
if( this.tree.activeNode === this ) {
|
500
|
+
var opts = this.tree.options;
|
501
|
+
if ( opts.onQueryActivate && opts.onQueryActivate.call(this.span, false, this) == false )
|
502
|
+
return; // Callback returned false
|
503
|
+
$(this.span).removeClass(opts.classNames.active);
|
504
|
+
if( opts.persist ) {
|
505
|
+
// Note: we don't pass null, but ''. So the cookie is not deleted.
|
506
|
+
// If we pass null, we also have to pass a COPY of opts, because $cookie will override opts.expires (issue 84)
|
507
|
+
$.cookie(opts.cookieId+"-active", "", opts.cookie);
|
508
|
+
}
|
509
|
+
this.tree.activeNode = null;
|
510
|
+
if ( fireEvents && opts.onDeactivate )
|
511
|
+
opts.onDeactivate.call(this.span, this);
|
512
|
+
}
|
513
|
+
}
|
514
|
+
},
|
515
|
+
|
516
|
+
activate: function() {
|
517
|
+
// Select - but not focus - this node.
|
518
|
+
// this.tree.logDebug("dtnode.activate(): %o", this);
|
519
|
+
this._activate(true, true);
|
520
|
+
},
|
521
|
+
|
522
|
+
deactivate: function() {
|
523
|
+
// this.tree.logDebug("dtnode.deactivate(): %o", this);
|
524
|
+
this._activate(false, true);
|
525
|
+
},
|
526
|
+
|
527
|
+
isActive: function() {
|
528
|
+
return (this.tree.activeNode === this);
|
529
|
+
},
|
530
|
+
|
531
|
+
_userActivate: function() {
|
532
|
+
// Handle user click / [space] / [enter], according to clickFolderMode.
|
533
|
+
var activate = true;
|
534
|
+
var expand = false;
|
535
|
+
if ( this.data.isFolder ) {
|
536
|
+
switch( this.tree.options.clickFolderMode ) {
|
537
|
+
case 2:
|
538
|
+
activate = false;
|
539
|
+
expand = true;
|
540
|
+
break;
|
541
|
+
case 3:
|
542
|
+
activate = expand = true;
|
543
|
+
break;
|
544
|
+
}
|
545
|
+
}
|
546
|
+
if( this.parent == null && this.tree.options.minExpandLevel>0 ) {
|
547
|
+
expand = false;
|
548
|
+
}
|
549
|
+
if( expand ) {
|
550
|
+
this.toggleExpand();
|
551
|
+
this.focus();
|
552
|
+
}
|
553
|
+
if( activate ) {
|
554
|
+
this.activate();
|
555
|
+
}
|
556
|
+
},
|
557
|
+
|
558
|
+
_setSubSel: function(hasSubSel) {
|
559
|
+
if( hasSubSel ) {
|
560
|
+
this.hasSubSel = true;
|
561
|
+
$(this.span).addClass(this.tree.options.classNames.partsel);
|
562
|
+
} else {
|
563
|
+
this.hasSubSel = false;
|
564
|
+
$(this.span).removeClass(this.tree.options.classNames.partsel);
|
565
|
+
}
|
566
|
+
},
|
567
|
+
|
568
|
+
_fixSelectionState: function() {
|
569
|
+
// fix selection status, for multi-hier mode
|
570
|
+
// this.tree.logDebug("_fixSelectionState(%o) - %o", this.bSelected, this);
|
571
|
+
if( this.bSelected ) {
|
572
|
+
// Select all children
|
573
|
+
this.visit(function(dtnode){
|
574
|
+
dtnode.parent._setSubSel(true);
|
575
|
+
dtnode._select(true, false, false);
|
576
|
+
});
|
577
|
+
// Select parents, if all children are selected
|
578
|
+
var p = this.parent;
|
579
|
+
while( p ) {
|
580
|
+
p._setSubSel(true);
|
581
|
+
var allChildsSelected = true;
|
582
|
+
for(var i=0; i<p.childList.length; i++) {
|
583
|
+
var n = p.childList[i];
|
584
|
+
if( !n.bSelected && !n.data.isStatusNode ) {
|
585
|
+
allChildsSelected = false;
|
586
|
+
break;
|
587
|
+
}
|
588
|
+
}
|
589
|
+
if( allChildsSelected )
|
590
|
+
p._select(true, false, false);
|
591
|
+
p = p.parent;
|
592
|
+
}
|
593
|
+
} else {
|
594
|
+
// Deselect all children
|
595
|
+
this._setSubSel(false);
|
596
|
+
this.visit(function(dtnode){
|
597
|
+
dtnode._setSubSel(false);
|
598
|
+
dtnode._select(false, false, false);
|
599
|
+
});
|
600
|
+
// Deselect parents, and recalc hasSubSel
|
601
|
+
var p = this.parent;
|
602
|
+
while( p ) {
|
603
|
+
p._select(false, false, false);
|
604
|
+
var isPartSel = false;
|
605
|
+
for(var i=0; i<p.childList.length; i++) {
|
606
|
+
if( p.childList[i].bSelected || p.childList[i].hasSubSel ) {
|
607
|
+
isPartSel = true;
|
608
|
+
break;
|
609
|
+
}
|
610
|
+
}
|
611
|
+
p._setSubSel(isPartSel);
|
612
|
+
p = p.parent;
|
613
|
+
}
|
614
|
+
}
|
615
|
+
},
|
616
|
+
|
617
|
+
_select: function(sel, fireEvents, deep) {
|
618
|
+
// Select - but not focus - this node.
|
619
|
+
// this.tree.logDebug("dtnode._select(%o) - %o", sel, this);
|
620
|
+
var opts = this.tree.options;
|
621
|
+
if( this.data.isStatusNode )
|
622
|
+
return;
|
623
|
+
//
|
624
|
+
if( this.bSelected == sel ) {
|
625
|
+
// this.tree.logDebug("dtnode._select(%o) IGNORED - %o", sel, this);
|
626
|
+
return;
|
627
|
+
}
|
628
|
+
// Allow event listener to abort selection
|
629
|
+
if ( fireEvents && opts.onQuerySelect && opts.onQuerySelect.call(this.span, sel, this) == false )
|
630
|
+
return; // Callback returned false
|
631
|
+
|
632
|
+
// Force single-selection
|
633
|
+
if( opts.selectMode==1 && sel ) {
|
634
|
+
this.tree.visit(function(dtnode){
|
635
|
+
if( dtnode.bSelected ) {
|
636
|
+
// Deselect; assuming that in selectMode:1 there's max. one other selected node
|
637
|
+
dtnode._select(false, false, false);
|
638
|
+
return false;
|
639
|
+
}
|
640
|
+
});
|
641
|
+
}
|
642
|
+
|
643
|
+
this.bSelected = sel;
|
644
|
+
// this.tree._changeNodeList("select", this, sel);
|
645
|
+
|
646
|
+
if( sel ) {
|
647
|
+
if( opts.persist )
|
648
|
+
this.tree.persistence.addSelect(this.data.key);
|
649
|
+
|
650
|
+
$(this.span).addClass(opts.classNames.selected);
|
651
|
+
|
652
|
+
if( deep && opts.selectMode==3 )
|
653
|
+
this._fixSelectionState();
|
654
|
+
|
655
|
+
if ( fireEvents && opts.onSelect )
|
656
|
+
opts.onSelect.call(this.span, true, this);
|
657
|
+
|
658
|
+
} else {
|
659
|
+
if( opts.persist )
|
660
|
+
this.tree.persistence.clearSelect(this.data.key);
|
661
|
+
|
662
|
+
$(this.span).removeClass(opts.classNames.selected);
|
663
|
+
|
664
|
+
if( deep && opts.selectMode==3 )
|
665
|
+
this._fixSelectionState();
|
666
|
+
|
667
|
+
if ( fireEvents && opts.onSelect )
|
668
|
+
opts.onSelect.call(this.span, false, this);
|
669
|
+
}
|
670
|
+
},
|
671
|
+
|
672
|
+
select: function(sel) {
|
673
|
+
// Select - but not focus - this node.
|
674
|
+
// this.tree.logDebug("dtnode.select(%o) - %o", sel, this);
|
675
|
+
if( this.data.unselectable )
|
676
|
+
return this.bSelected;
|
677
|
+
return this._select(sel!=false, true, true);
|
678
|
+
},
|
679
|
+
|
680
|
+
toggleSelect: function() {
|
681
|
+
// this.tree.logDebug("dtnode.toggleSelect() - %o", this);
|
682
|
+
return this.select(!this.bSelected);
|
683
|
+
},
|
684
|
+
|
685
|
+
isSelected: function() {
|
686
|
+
return this.bSelected;
|
687
|
+
},
|
688
|
+
|
689
|
+
_loadContent: function() {
|
690
|
+
try {
|
691
|
+
var opts = this.tree.options;
|
692
|
+
this.tree.logDebug("_loadContent: start - %o", this);
|
693
|
+
this.setLazyNodeStatus(DTNodeStatus_Loading);
|
694
|
+
if( true == opts.onLazyRead.call(this.span, this) ) {
|
695
|
+
// If function returns 'true', we assume that the loading is done:
|
696
|
+
this.setLazyNodeStatus(DTNodeStatus_Ok);
|
697
|
+
// Otherwise (i.e. if the loading was started as an asynchronous process)
|
698
|
+
// the onLazyRead(dtnode) handler is expected to call dtnode.setLazyNodeStatus(DTNodeStatus_Ok/_Error) when done.
|
699
|
+
this.tree.logDebug("_loadContent: succeeded - %o", this);
|
700
|
+
}
|
701
|
+
} catch(e) {
|
702
|
+
alert(e);
|
703
|
+
this.setLazyNodeStatus(DTNodeStatus_Error);
|
704
|
+
}
|
705
|
+
},
|
706
|
+
|
707
|
+
_expand: function(bExpand) {
|
708
|
+
// this.tree.logDebug("dtnode._expand(%o) - %o", bExpand, this);
|
709
|
+
if( this.bExpanded == bExpand ) {
|
710
|
+
// this.tree.logDebug("dtnode._expand(%o) IGNORED - %o", bExpand, this);
|
711
|
+
return;
|
712
|
+
}
|
713
|
+
var opts = this.tree.options;
|
714
|
+
if( !bExpand && this.getLevel()<opts.minExpandLevel ) {
|
715
|
+
this.tree.logDebug("dtnode._expand(%o) forced expand - %o", bExpand, this);
|
716
|
+
return;
|
717
|
+
}
|
718
|
+
if ( opts.onQueryExpand && opts.onQueryExpand.call(this.span, bExpand, this) == false )
|
719
|
+
return; // Callback returned false
|
720
|
+
this.bExpanded = bExpand;
|
721
|
+
|
722
|
+
// Persist expand state
|
723
|
+
if( opts.persist ) {
|
724
|
+
if( bExpand )
|
725
|
+
this.tree.persistence.addExpand(this.data.key);
|
726
|
+
else
|
727
|
+
this.tree.persistence.clearExpand(this.data.key);
|
728
|
+
}
|
729
|
+
|
730
|
+
this.render(false);
|
731
|
+
|
732
|
+
// Auto-collapse mode: collapse all siblings
|
733
|
+
if( this.bExpanded && this.parent && opts.autoCollapse ) {
|
734
|
+
var parents = this._parentList(false, true);
|
735
|
+
for(var i=0; i<parents.length; i++)
|
736
|
+
parents[i].collapseSiblings();
|
737
|
+
}
|
738
|
+
|
739
|
+
// If the currently active node is now hidden, deactivate it
|
740
|
+
if( opts.activeVisible && this.tree.activeNode && ! this.tree.activeNode.isVisible() ) {
|
741
|
+
this.tree.activeNode.deactivate();
|
742
|
+
}
|
743
|
+
// Expanding a lazy node: set 'loading...' and call callback
|
744
|
+
if( bExpand && this.data.isLazy && this.childList==null && !this.isLoading ) {
|
745
|
+
this._loadContent();
|
746
|
+
return;
|
747
|
+
}
|
748
|
+
// this.tree.logDebug("_expand: start div toggle - %o", this);
|
749
|
+
|
750
|
+
var fxDuration = opts.fx ? (opts.fx.duration || 200) : 0;
|
751
|
+
if( this.childList ) {
|
752
|
+
for(var i=0; i<this.childList.length; i++ ) {
|
753
|
+
var $child = $(this.childList[i].div);
|
754
|
+
if( fxDuration ) {
|
755
|
+
// This is a toggle, so only do it, if not already rendered (in)visible (issue 98)
|
756
|
+
if( bExpand != $child.is(':visible') )
|
757
|
+
$child.animate(opts.fx, fxDuration);
|
758
|
+
} else {
|
759
|
+
if( bExpand )
|
760
|
+
$child.show();
|
761
|
+
else
|
762
|
+
$child.hide(); // TODO: this seems to be slow, when called the first time for an element
|
763
|
+
}
|
764
|
+
}
|
765
|
+
}
|
766
|
+
|
767
|
+
/* issue 109: using selector filter is really SLOW.
|
768
|
+
// issue 98: only toggle, if render hasn't set visibility already:
|
769
|
+
var filter = ">DIV" + (bExpand ? ":hidden" : ":visible");
|
770
|
+
|
771
|
+
if( opts.fx ) {
|
772
|
+
var duration = opts.fx.duration || 200;
|
773
|
+
// $(">DIV", this.div).animate(opts.fx, duration);
|
774
|
+
$(filter, this.div).animate(opts.fx, duration);
|
775
|
+
} else {
|
776
|
+
$(filter, this.div).toggle();
|
777
|
+
// var $d = $(">DIV", this.div);
|
778
|
+
// this.tree.logDebug("_expand: got div, start toggle - %o", this);
|
779
|
+
// $d.toggle();
|
780
|
+
}
|
781
|
+
//*/
|
782
|
+
// this.tree.logDebug("_expand: end div toggle - %o", this);
|
783
|
+
|
784
|
+
if ( opts.onExpand )
|
785
|
+
opts.onExpand.call(this.span, bExpand, this);
|
786
|
+
},
|
787
|
+
|
788
|
+
expand: function(flag) {
|
789
|
+
if( !this.childList && !this.data.isLazy && flag )
|
790
|
+
return; // Prevent expanding empty nodes
|
791
|
+
if( this.parent == null && this.tree.options.minExpandLevel>0 && !flag)
|
792
|
+
return; // Prevent collapsing the root
|
793
|
+
this._expand(flag);
|
794
|
+
},
|
795
|
+
|
796
|
+
toggleExpand: function() {
|
797
|
+
this.expand(!this.bExpanded);
|
798
|
+
},
|
799
|
+
|
800
|
+
collapseSiblings: function() {
|
801
|
+
if( this.parent == null )
|
802
|
+
return;
|
803
|
+
var ac = this.parent.childList;
|
804
|
+
for (var i=0; i<ac.length; i++) {
|
805
|
+
if ( ac[i] !== this && ac[i].bExpanded )
|
806
|
+
ac[i]._expand(false);
|
807
|
+
}
|
808
|
+
},
|
809
|
+
|
810
|
+
onClick: function(event) {
|
811
|
+
// this.tree.logDebug("dtnode.onClick(" + event.type + "): dtnode:" + this + ", button:" + event.button + ", which: " + event.which);
|
812
|
+
var targetType = this.getEventTargetType(event);
|
813
|
+
if( targetType == "expander" ) {
|
814
|
+
// Clicking the expander icon always expands/collapses
|
815
|
+
this.toggleExpand();
|
816
|
+
this.focus(); // issue 95
|
817
|
+
} else if( targetType == "checkbox" ) {
|
818
|
+
// Clicking the checkbox always (de)selects
|
819
|
+
this.toggleSelect();
|
820
|
+
this.focus(); // issue 95
|
821
|
+
} else {
|
822
|
+
this._userActivate();
|
823
|
+
// Chrome and Safari don't focus the a-tag on click
|
824
|
+
this.span.getElementsByTagName("a")[0].focus();
|
825
|
+
}
|
826
|
+
// Make sure that clicks stop, otherwise <a href='#'> jumps to the top
|
827
|
+
return false;
|
828
|
+
},
|
829
|
+
|
830
|
+
onDblClick: function(event) {
|
831
|
+
// this.tree.logDebug("dtnode.onDblClick(" + event.type + "): dtnode:" + this + ", button:" + event.button + ", which: " + event.which);
|
832
|
+
},
|
833
|
+
|
834
|
+
onKeydown: function(event) {
|
835
|
+
// this.tree.logDebug("dtnode.onKeydown(" + event.type + "): dtnode:" + this + ", charCode:" + event.charCode + ", keyCode: " + event.keyCode + ", which: " + event.which);
|
836
|
+
var handled = true;
|
837
|
+
// alert("keyDown" + event.which);
|
838
|
+
|
839
|
+
switch( event.which ) {
|
840
|
+
// charCodes:
|
841
|
+
// case 43: // '+'
|
842
|
+
case 107: // '+'
|
843
|
+
case 187: // '+' @ Chrome, Safari
|
844
|
+
if( !this.bExpanded ) this.toggleExpand();
|
845
|
+
break;
|
846
|
+
// case 45: // '-'
|
847
|
+
case 109: // '-'
|
848
|
+
case 189: // '+' @ Chrome, Safari
|
849
|
+
if( this.bExpanded ) this.toggleExpand();
|
850
|
+
break;
|
851
|
+
//~ case 42: // '*'
|
852
|
+
//~ break;
|
853
|
+
//~ case 47: // '/'
|
854
|
+
//~ break;
|
855
|
+
// case 13: // <enter>
|
856
|
+
// <enter> on a focused <a> tag seems to generate a click-event.
|
857
|
+
// this._userActivate();
|
858
|
+
// break;
|
859
|
+
case 32: // <space>
|
860
|
+
this._userActivate();
|
861
|
+
break;
|
862
|
+
case 8: // <backspace>
|
863
|
+
if( this.parent )
|
864
|
+
this.parent.focus();
|
865
|
+
break;
|
866
|
+
case 37: // <left>
|
867
|
+
if( this.bExpanded ) {
|
868
|
+
this.toggleExpand();
|
869
|
+
this.focus();
|
870
|
+
} else if( this.parent && (this.tree.options.rootVisible || this.parent.parent) ) {
|
871
|
+
this.parent.focus();
|
872
|
+
}
|
873
|
+
break;
|
874
|
+
case 39: // <right>
|
875
|
+
if( !this.bExpanded && (this.childList || this.data.isLazy) ) {
|
876
|
+
this.toggleExpand();
|
877
|
+
this.focus();
|
878
|
+
} else if( this.childList ) {
|
879
|
+
this.childList[0].focus();
|
880
|
+
}
|
881
|
+
break;
|
882
|
+
case 38: // <up>
|
883
|
+
var sib = this.prevSibling();
|
884
|
+
while( sib && sib.bExpanded && sib.childList )
|
885
|
+
sib = sib.childList[sib.childList.length-1];
|
886
|
+
if( !sib && this.parent && (this.tree.options.rootVisible || this.parent.parent) )
|
887
|
+
sib = this.parent;
|
888
|
+
if( sib ) sib.focus();
|
889
|
+
break;
|
890
|
+
case 40: // <down>
|
891
|
+
var sib;
|
892
|
+
if( this.bExpanded && this.childList ) {
|
893
|
+
sib = this.childList[0];
|
894
|
+
} else {
|
895
|
+
var parents = this._parentList(false, true);
|
896
|
+
for(var i=parents.length-1; i>=0; i--) {
|
897
|
+
sib = parents[i].nextSibling();
|
898
|
+
if( sib ) break;
|
899
|
+
}
|
900
|
+
}
|
901
|
+
if( sib ) sib.focus();
|
902
|
+
break;
|
903
|
+
default:
|
904
|
+
handled = false;
|
905
|
+
}
|
906
|
+
// Return false, if handled, to prevent default processing
|
907
|
+
return !handled;
|
908
|
+
},
|
909
|
+
|
910
|
+
onKeypress: function(event) {
|
911
|
+
// onKeypress is only hooked to allow user callbacks.
|
912
|
+
// We don't process it, because IE and Safari don't fire keypress for cursor keys.
|
913
|
+
// this.tree.logDebug("dtnode.onKeypress(" + event.type + "): dtnode:" + this + ", charCode:" + event.charCode + ", keyCode: " + event.keyCode + ", which: " + event.which);
|
914
|
+
},
|
915
|
+
|
916
|
+
onFocus: function(event) {
|
917
|
+
// Handles blur and focus events.
|
918
|
+
// this.tree.logDebug("dtnode.onFocus(%o): %o", event, this);
|
919
|
+
var opts = this.tree.options;
|
920
|
+
if ( event.type=="blur" || event.type=="focusout" ) {
|
921
|
+
if ( opts.onBlur ) // Pass element as 'this' (jQuery convention)
|
922
|
+
opts.onBlur.call(this.span, this);
|
923
|
+
if( this.tree.tnFocused )
|
924
|
+
$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);
|
925
|
+
this.tree.tnFocused = null;
|
926
|
+
if( opts.persist )
|
927
|
+
$.cookie(opts.cookieId+"-focus", "", opts.cookie);
|
928
|
+
} else if ( event.type=="focus" || event.type=="focusin") {
|
929
|
+
// Fix: sometimes the blur event is not generated
|
930
|
+
if( this.tree.tnFocused && this.tree.tnFocused !== this ) {
|
931
|
+
this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o", this.tree.tnFocused);
|
932
|
+
$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);
|
933
|
+
}
|
934
|
+
this.tree.tnFocused = this;
|
935
|
+
if ( opts.onFocus ) // Pass element as 'this' (jQuery convention)
|
936
|
+
opts.onFocus.call(this.span, this);
|
937
|
+
$(this.tree.tnFocused.span).addClass(opts.classNames.focused);
|
938
|
+
if( opts.persist )
|
939
|
+
$.cookie(opts.cookieId+"-focus", this.data.key, opts.cookie);
|
940
|
+
}
|
941
|
+
// TODO: return anything?
|
942
|
+
// return false;
|
943
|
+
},
|
944
|
+
|
945
|
+
visit: function(fn, data, includeSelf) {
|
946
|
+
// Call fn(dtnode, data) for all child nodes. Stop iteration, if fn() returns false.
|
947
|
+
var n = 0;
|
948
|
+
if( includeSelf == true ) {
|
949
|
+
if( fn(this, data) == false )
|
950
|
+
return 1;
|
951
|
+
n++;
|
952
|
+
}
|
953
|
+
if ( this.childList )
|
954
|
+
for (var i=0; i<this.childList.length; i++)
|
955
|
+
n += this.childList[i].visit(fn, data, true);
|
956
|
+
return n;
|
957
|
+
},
|
958
|
+
|
959
|
+
remove: function() {
|
960
|
+
// Remove this node
|
961
|
+
// this.tree.logDebug ("%o.remove()", this);
|
962
|
+
if ( this === this.tree.root )
|
963
|
+
return false;
|
964
|
+
return this.parent.removeChild(this);
|
965
|
+
},
|
966
|
+
|
967
|
+
removeChild: function(tn) {
|
968
|
+
// Remove tn from list of direct children.
|
969
|
+
var ac = this.childList;
|
970
|
+
if( ac.length == 1 ) {
|
971
|
+
if( tn !== ac[0] )
|
972
|
+
throw "removeChild: invalid child";
|
973
|
+
return this.removeChildren();
|
974
|
+
}
|
975
|
+
if( tn === this.tree.activeNode )
|
976
|
+
tn.deactivate();
|
977
|
+
if( this.tree.options.persist ) {
|
978
|
+
if( tn.bSelected )
|
979
|
+
this.tree.persistence.clearSelect(tn.data.key);
|
980
|
+
if ( tn.bExpanded )
|
981
|
+
this.tree.persistence.clearExpand(tn.data.key);
|
982
|
+
}
|
983
|
+
tn.removeChildren(true);
|
984
|
+
this.div.removeChild(tn.div);
|
985
|
+
for(var i=0; i<ac.length; i++) {
|
986
|
+
if( ac[i] === tn ) {
|
987
|
+
this.childList.splice(i, 1);
|
988
|
+
delete tn;
|
989
|
+
break;
|
990
|
+
}
|
991
|
+
}
|
992
|
+
},
|
993
|
+
|
994
|
+
removeChildren: function(isRecursiveCall) {
|
995
|
+
// Remove all child nodes (more efficiently than recursive remove())
|
996
|
+
// this.tree.logDebug ("%o.removeChildren(%o)", this, isRecursiveCall);
|
997
|
+
var tree = this.tree;
|
998
|
+
var ac = this.childList;
|
999
|
+
if( ac ) {
|
1000
|
+
for(var i=0; i<ac.length; i++) {
|
1001
|
+
var tn=ac[i];
|
1002
|
+
// this.tree.logDebug ("del %o", tn);
|
1003
|
+
if ( tn === tree.activeNode )
|
1004
|
+
tn.deactivate();
|
1005
|
+
if( this.tree.options.persist ) {
|
1006
|
+
if( tn.bSelected )
|
1007
|
+
this.tree.persistence.clearSelect(tn.data.key);
|
1008
|
+
if ( tn.bExpanded )
|
1009
|
+
this.tree.persistence.clearExpand(tn.data.key);
|
1010
|
+
}
|
1011
|
+
tn.removeChildren(true);
|
1012
|
+
this.div.removeChild(tn.div);
|
1013
|
+
delete tn;
|
1014
|
+
}
|
1015
|
+
this.childList = null;
|
1016
|
+
}
|
1017
|
+
if( ! isRecursiveCall ) {
|
1018
|
+
// this._expand(false);
|
1019
|
+
// this.isRead = false;
|
1020
|
+
this.isLoading = false;
|
1021
|
+
this.render(false, false);
|
1022
|
+
}
|
1023
|
+
},
|
1024
|
+
|
1025
|
+
reload: function(force) {
|
1026
|
+
// Discard lazy content (and reload, if node is expanded).
|
1027
|
+
if( ! this.data.isLazy )
|
1028
|
+
throw "node.reload() requires lazy nodes.";
|
1029
|
+
if( this.bExpanded ) {
|
1030
|
+
this.expand(false);
|
1031
|
+
this.removeChildren();
|
1032
|
+
this.expand(true);
|
1033
|
+
} else {
|
1034
|
+
this.removeChildren();
|
1035
|
+
if( force )
|
1036
|
+
this._loadContent();
|
1037
|
+
}
|
1038
|
+
},
|
1039
|
+
|
1040
|
+
_addChildNode: function(dtnode, beforeNode) {
|
1041
|
+
/**
|
1042
|
+
* Internal function to add one single DynatreeNode as a child.
|
1043
|
+
*
|
1044
|
+
*/
|
1045
|
+
var tree = this.tree;
|
1046
|
+
var opts = tree.options;
|
1047
|
+
var pers = tree.persistence;
|
1048
|
+
|
1049
|
+
// tree.logDebug("%o._addChildNode(%o)", this, dtnode);
|
1050
|
+
|
1051
|
+
// --- Update and fix dtnode attributes if necessary
|
1052
|
+
dtnode.parent = this;
|
1053
|
+
// if( beforeNode && (beforeNode.parent !== this || beforeNode === dtnode ) )
|
1054
|
+
// throw "<beforeNode> must be another child of <this>";
|
1055
|
+
|
1056
|
+
// --- Add dtnode as a child
|
1057
|
+
if ( this.childList==null ) {
|
1058
|
+
this.childList = [];
|
1059
|
+
} else if( ! beforeNode ) {
|
1060
|
+
// Fix 'lastsib'
|
1061
|
+
$(this.childList[this.childList.length-1].span).removeClass(opts.classNames.lastsib);
|
1062
|
+
}
|
1063
|
+
if( beforeNode ) {
|
1064
|
+
var iBefore = $.inArray(beforeNode, this.childList);
|
1065
|
+
if( iBefore < 0 )
|
1066
|
+
throw "<beforeNode> must be a child of <this>";
|
1067
|
+
this.childList.splice(iBefore, 0, dtnode);
|
1068
|
+
// alert(this.childList);
|
1069
|
+
} else {
|
1070
|
+
// Append node
|
1071
|
+
this.childList.push(dtnode);
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
// --- Handle persistence
|
1075
|
+
// Initial status is read from cookies, if persistence is active and
|
1076
|
+
// cookies are already present.
|
1077
|
+
// Otherwise the status is read from the data attributes and then persisted.
|
1078
|
+
var isInitializing = tree.isInitializing();
|
1079
|
+
if( opts.persist && pers.cookiesFound && isInitializing ) {
|
1080
|
+
// Init status from cookies
|
1081
|
+
// tree.logDebug("init from cookie, pa=%o, dk=%o", pers.activeKey, dtnode.data.key);
|
1082
|
+
if( pers.activeKey == dtnode.data.key )
|
1083
|
+
tree.activeNode = dtnode;
|
1084
|
+
if( pers.focusedKey == dtnode.data.key )
|
1085
|
+
tree.focusNode = dtnode;
|
1086
|
+
dtnode.bExpanded = ($.inArray(dtnode.data.key, pers.expandedKeyList) >= 0);
|
1087
|
+
dtnode.bSelected = ($.inArray(dtnode.data.key, pers.selectedKeyList) >= 0);
|
1088
|
+
} else {
|
1089
|
+
// Init status from data (Note: we write the cookies after the init phase)
|
1090
|
+
// tree.logDebug("init from data");
|
1091
|
+
if( dtnode.data.activate ) {
|
1092
|
+
tree.activeNode = dtnode;
|
1093
|
+
if( opts.persist )
|
1094
|
+
pers.activeKey = dtnode.data.key;
|
1095
|
+
}
|
1096
|
+
if( dtnode.data.focus ) {
|
1097
|
+
tree.focusNode = dtnode;
|
1098
|
+
if( opts.persist )
|
1099
|
+
pers.focusedKey = dtnode.data.key;
|
1100
|
+
}
|
1101
|
+
dtnode.bExpanded = ( dtnode.data.expand == true ); // Collapsed by default
|
1102
|
+
if( dtnode.bExpanded && opts.persist )
|
1103
|
+
pers.addExpand(dtnode.data.key);
|
1104
|
+
dtnode.bSelected = ( dtnode.data.select == true ); // Deselected by default
|
1105
|
+
/*
|
1106
|
+
Doesn't work, cause pers.selectedKeyList may be null
|
1107
|
+
if( dtnode.bSelected && opts.selectMode==1
|
1108
|
+
&& pers.selectedKeyList && pers.selectedKeyList.length>0 ) {
|
1109
|
+
tree.logWarning("Ignored multi-selection in single-mode for %o", dtnode);
|
1110
|
+
dtnode.bSelected = false; // Fixing bad input data (multi selection for mode:1)
|
1111
|
+
}
|
1112
|
+
*/
|
1113
|
+
if( dtnode.bSelected && opts.persist )
|
1114
|
+
pers.addSelect(dtnode.data.key);
|
1115
|
+
}
|
1116
|
+
|
1117
|
+
// Always expand, if it's below minExpandLevel
|
1118
|
+
// tree.logDebug ("%o._addChildNode(%o), l=%o", this, dtnode, dtnode.getLevel());
|
1119
|
+
if ( opts.minExpandLevel >= dtnode.getLevel() ) {
|
1120
|
+
tree.logDebug ("Force expand for %o", dtnode);
|
1121
|
+
this.bExpanded = true;
|
1122
|
+
}
|
1123
|
+
|
1124
|
+
// In multi-hier mode, update the parents selection state
|
1125
|
+
// issue #82: only if not initializing, because the children may not exist yet
|
1126
|
+
// if( !dtnode.data.isStatusNode && opts.selectMode==3 && !isInitializing )
|
1127
|
+
// dtnode._fixSelectionState();
|
1128
|
+
|
1129
|
+
// In multi-hier mode, update the parents selection state
|
1130
|
+
if( dtnode.bSelected && opts.selectMode==3 ) {
|
1131
|
+
var p = this;
|
1132
|
+
while( p ) {
|
1133
|
+
if( !p.hasSubSel )
|
1134
|
+
p._setSubSel(true);
|
1135
|
+
p = p.parent;
|
1136
|
+
}
|
1137
|
+
}
|
1138
|
+
// render this node and the new child
|
1139
|
+
if ( tree.bEnableUpdate )
|
1140
|
+
this.render(true, true);
|
1141
|
+
|
1142
|
+
return dtnode;
|
1143
|
+
},
|
1144
|
+
|
1145
|
+
addChild: function(obj, beforeNode) {
|
1146
|
+
/**
|
1147
|
+
* Add a node object as child.
|
1148
|
+
*
|
1149
|
+
* This should be the only place, where a DynaTreeNode is constructed!
|
1150
|
+
* (Except for the root node creation in the tree constructor)
|
1151
|
+
*
|
1152
|
+
* @param obj A JS object (may be recursive) or an array of those.
|
1153
|
+
* @param {DynaTreeNode} beforeNode (optional) sibling node.
|
1154
|
+
*
|
1155
|
+
* Data format: array of node objects, with optional 'children' attributes.
|
1156
|
+
* [
|
1157
|
+
* { title: "t1", isFolder: true, ... }
|
1158
|
+
* { title: "t2", isFolder: true, ...,
|
1159
|
+
* children: [
|
1160
|
+
* {title: "t2.1", ..},
|
1161
|
+
* {..}
|
1162
|
+
* ]
|
1163
|
+
* }
|
1164
|
+
* ]
|
1165
|
+
* A simple object is also accepted instead of an array.
|
1166
|
+
*
|
1167
|
+
*/
|
1168
|
+
// this.tree.logDebug("%o.addChild(%o, %o)", this, obj, beforeNode);
|
1169
|
+
if( !obj || obj.length==0 ) // Passed null or undefined or empty array
|
1170
|
+
return;
|
1171
|
+
if( obj instanceof DynaTreeNode )
|
1172
|
+
return this._addChildNode(obj, beforeNode);
|
1173
|
+
if( !obj.length ) // Passed a single data object
|
1174
|
+
obj = [ obj ];
|
1175
|
+
|
1176
|
+
var prevFlag = this.tree.enableUpdate(false);
|
1177
|
+
|
1178
|
+
var tnFirst = null;
|
1179
|
+
for (var i=0; i<obj.length; i++) {
|
1180
|
+
var data = obj[i];
|
1181
|
+
var dtnode = this._addChildNode(new DynaTreeNode(this, this.tree, data), beforeNode);
|
1182
|
+
if( !tnFirst ) tnFirst = dtnode;
|
1183
|
+
// Add child nodes recursively
|
1184
|
+
if( data.children )
|
1185
|
+
dtnode.addChild(data.children, null);
|
1186
|
+
}
|
1187
|
+
this.tree.enableUpdate(prevFlag);
|
1188
|
+
return tnFirst;
|
1189
|
+
},
|
1190
|
+
|
1191
|
+
append: function(obj) {
|
1192
|
+
this.tree.logWarning("node.append() is deprecated (use node.addChild() instead).");
|
1193
|
+
return this.addChild(obj, null);
|
1194
|
+
},
|
1195
|
+
|
1196
|
+
appendAjax: function(ajaxOptions) {
|
1197
|
+
this.removeChildren();
|
1198
|
+
this.setLazyNodeStatus(DTNodeStatus_Loading);
|
1199
|
+
// Ajax option inheritance: $.ajaxSetup < $.ui.dynatree.defaults.ajaxDefaults < tree.options.ajaxDefaults < ajaxOptions
|
1200
|
+
var self = this;
|
1201
|
+
var orgSuccess = ajaxOptions.success;
|
1202
|
+
var orgError = ajaxOptions.error;
|
1203
|
+
var options = $.extend({}, this.tree.options.ajaxDefaults, ajaxOptions, {
|
1204
|
+
success: function(data, textStatus){
|
1205
|
+
// <this> is the request options
|
1206
|
+
var prevPhase = self.tree.phase;
|
1207
|
+
self.tree.phase = "init";
|
1208
|
+
// self.append(data);
|
1209
|
+
self.addChild(data, null);
|
1210
|
+
self.tree.phase = "postInit";
|
1211
|
+
self.setLazyNodeStatus(DTNodeStatus_Ok);
|
1212
|
+
if( orgSuccess )
|
1213
|
+
orgSuccess.call(options, self);
|
1214
|
+
self.tree.phase = prevPhase;
|
1215
|
+
},
|
1216
|
+
error: function(XMLHttpRequest, textStatus, errorThrown){
|
1217
|
+
// <this> is the request options
|
1218
|
+
self.setLazyNodeStatus(DTNodeStatus_Error);
|
1219
|
+
if( orgError )
|
1220
|
+
orgError.call(options, self, XMLHttpRequest, textStatus, errorThrown);
|
1221
|
+
}
|
1222
|
+
});
|
1223
|
+
$.ajax(options);
|
1224
|
+
},
|
1225
|
+
// --- end of class
|
1226
|
+
lastentry: undefined
|
1227
|
+
}
|
1228
|
+
|
1229
|
+
/*************************************************************************
|
1230
|
+
* class DynaTreeStatus
|
1231
|
+
*/
|
1232
|
+
|
1233
|
+
var DynaTreeStatus = Class.create();
|
1234
|
+
|
1235
|
+
|
1236
|
+
DynaTreeStatus._getTreePersistData = function(cookieId, cookieOpts) {
|
1237
|
+
// Static member: Return persistence information from cookies
|
1238
|
+
var ts = new DynaTreeStatus(cookieId, cookieOpts);
|
1239
|
+
ts.read();
|
1240
|
+
return ts.toDict();
|
1241
|
+
}
|
1242
|
+
// Make available in global scope
|
1243
|
+
getDynaTreePersistData = DynaTreeStatus._getTreePersistData;
|
1244
|
+
|
1245
|
+
|
1246
|
+
DynaTreeStatus.prototype = {
|
1247
|
+
// Constructor
|
1248
|
+
initialize: function(cookieId, cookieOpts) {
|
1249
|
+
if( cookieId === undefined )
|
1250
|
+
cookieId = $.ui.dynatree.defaults.cookieId;
|
1251
|
+
cookieOpts = $.extend({}, $.ui.dynatree.defaults.cookie, cookieOpts);
|
1252
|
+
|
1253
|
+
this.cookieId = cookieId;
|
1254
|
+
this.cookieOpts = cookieOpts;
|
1255
|
+
this.cookiesFound = undefined;
|
1256
|
+
this.activeKey = null;
|
1257
|
+
this.focusedKey = null;
|
1258
|
+
this.expandedKeyList = null;
|
1259
|
+
this.selectedKeyList = null;
|
1260
|
+
},
|
1261
|
+
// member functions
|
1262
|
+
_log: function(msg) {
|
1263
|
+
// this.logDebug("_changeNodeList(%o): nodeList:%o, idx:%o", mode, nodeList, idx);
|
1264
|
+
Array.prototype.unshift.apply(arguments, ["debug"]);
|
1265
|
+
_log.apply(this, arguments);
|
1266
|
+
},
|
1267
|
+
read: function() {
|
1268
|
+
// Read or init cookies.
|
1269
|
+
this.cookiesFound = false;
|
1270
|
+
|
1271
|
+
var cookie = $.cookie(this.cookieId + "-active");
|
1272
|
+
this.activeKey = ( cookie == null ) ? "" : cookie;
|
1273
|
+
if( cookie != null ) this.cookiesFound = true;
|
1274
|
+
|
1275
|
+
cookie = $.cookie(this.cookieId + "-focus");
|
1276
|
+
this.focusedKey = ( cookie == null ) ? "" : cookie;
|
1277
|
+
if( cookie != null ) this.cookiesFound = true;
|
1278
|
+
|
1279
|
+
cookie = $.cookie(this.cookieId + "-expand");
|
1280
|
+
this.expandedKeyList = ( cookie == null ) ? [] : cookie.split(",");
|
1281
|
+
if( cookie != null ) this.cookiesFound = true;
|
1282
|
+
|
1283
|
+
cookie = $.cookie(this.cookieId + "-select");
|
1284
|
+
this.selectedKeyList = ( cookie == null ) ? [] : cookie.split(",");
|
1285
|
+
if( cookie != null ) this.cookiesFound = true;
|
1286
|
+
},
|
1287
|
+
write: function() {
|
1288
|
+
$.cookie(this.cookieId + "-active", ( this.activeKey == null ) ? "" : this.activeKey, this.cookieOpts);
|
1289
|
+
$.cookie(this.cookieId + "-focus", ( this.focusedKey == null ) ? "" : this.focusedKey, this.cookieOpts);
|
1290
|
+
$.cookie(this.cookieId + "-expand", ( this.expandedKeyList == null ) ? "" : this.expandedKeyList.join(","), this.cookieOpts);
|
1291
|
+
$.cookie(this.cookieId + "-select", ( this.selectedKeyList == null ) ? "" : this.selectedKeyList.join(","), this.cookieOpts);
|
1292
|
+
},
|
1293
|
+
addExpand: function(key) {
|
1294
|
+
// this._log("addExpand(%o)", key);
|
1295
|
+
if( $.inArray(key, this.expandedKeyList) < 0 ) {
|
1296
|
+
this.expandedKeyList.push(key);
|
1297
|
+
$.cookie(this.cookieId + "-expand", this.expandedKeyList.join(","), this.cookieOpts);
|
1298
|
+
}
|
1299
|
+
},
|
1300
|
+
clearExpand: function(key) {
|
1301
|
+
// this._log("clearExpand(%o)", key);
|
1302
|
+
var idx = $.inArray(key, this.expandedKeyList);
|
1303
|
+
if( idx >= 0 ) {
|
1304
|
+
this.expandedKeyList.splice(idx, 1);
|
1305
|
+
$.cookie(this.cookieId + "-expand", this.expandedKeyList.join(","), this.cookieOpts);
|
1306
|
+
}
|
1307
|
+
},
|
1308
|
+
addSelect: function(key) {
|
1309
|
+
// this._log("addSelect(%o)", key);
|
1310
|
+
if( $.inArray(key, this.selectedKeyList) < 0 ) {
|
1311
|
+
this.selectedKeyList.push(key);
|
1312
|
+
$.cookie(this.cookieId + "-select", this.selectedKeyList.join(","), this.cookieOpts);
|
1313
|
+
}
|
1314
|
+
},
|
1315
|
+
clearSelect: function(key) {
|
1316
|
+
// this._log("clearSelect(%o)", key);
|
1317
|
+
var idx = $.inArray(key, this.selectedKeyList);
|
1318
|
+
if( idx >= 0 ) {
|
1319
|
+
this.selectedKeyList.splice(idx, 1);
|
1320
|
+
$.cookie(this.cookieId + "-select", this.selectedKeyList.join(","), this.cookieOpts);
|
1321
|
+
}
|
1322
|
+
},
|
1323
|
+
isReloading: function() {
|
1324
|
+
return this.cookiesFound == true;
|
1325
|
+
},
|
1326
|
+
toDict: function() {
|
1327
|
+
return {
|
1328
|
+
cookiesFound: this.cookiesFound,
|
1329
|
+
activeKey: this.activeKey,
|
1330
|
+
focusedKey: this.activeKey,
|
1331
|
+
expandedKeyList: this.expandedKeyList,
|
1332
|
+
selectedKeyList: this.selectedKeyList
|
1333
|
+
};
|
1334
|
+
},
|
1335
|
+
// --- end of class
|
1336
|
+
lastentry: undefined
|
1337
|
+
};
|
1338
|
+
|
1339
|
+
|
1340
|
+
/*************************************************************************
|
1341
|
+
* class DynaTree
|
1342
|
+
*/
|
1343
|
+
|
1344
|
+
var DynaTree = Class.create();
|
1345
|
+
|
1346
|
+
// --- Static members ----------------------------------------------------------
|
1347
|
+
|
1348
|
+
DynaTree.version = "$Version: 0.5.1$";
|
1349
|
+
/*
|
1350
|
+
DynaTree._initTree = function() {
|
1351
|
+
};
|
1352
|
+
|
1353
|
+
DynaTree._bind = function() {
|
1354
|
+
};
|
1355
|
+
*/
|
1356
|
+
//--- Class members ------------------------------------------------------------
|
1357
|
+
|
1358
|
+
DynaTree.prototype = {
|
1359
|
+
// Constructor
|
1360
|
+
initialize: function(divContainer, options) {
|
1361
|
+
// instance members
|
1362
|
+
this.phase = "init";
|
1363
|
+
|
1364
|
+
this.options = options;
|
1365
|
+
|
1366
|
+
this.bEnableUpdate = true;
|
1367
|
+
this._nodeCount = 1;
|
1368
|
+
this.activeNode = null;
|
1369
|
+
this.focusNode = null;
|
1370
|
+
|
1371
|
+
this.persistence = new DynaTreeStatus(options.cookieId, options.cookie);
|
1372
|
+
if( this.options.persist ) {
|
1373
|
+
if( !$.cookie )
|
1374
|
+
_log("warn", "Please include jquery.cookie.js to use persistence.");
|
1375
|
+
this.persistence.read();
|
1376
|
+
}
|
1377
|
+
this.logDebug("DynaTree.persistence: %o", this.persistence.toDict());
|
1378
|
+
|
1379
|
+
// Cached tag strings
|
1380
|
+
this.cache = {
|
1381
|
+
tagEmpty: "<span class='" + options.classNames.empty + "'></span>",
|
1382
|
+
tagVline: "<span class='" + options.classNames.vline + "'></span>",
|
1383
|
+
tagExpander: "<span class='" + options.classNames.expander + "'></span>",
|
1384
|
+
tagConnector: "<span class='" + options.classNames.connector + "'></span>",
|
1385
|
+
tagNodeIcon: "<span class='" + options.classNames.nodeIcon + "'></span>",
|
1386
|
+
tagCheckbox: "<span class='" + options.classNames.checkbox + "'></span>",
|
1387
|
+
lastentry: undefined
|
1388
|
+
};
|
1389
|
+
|
1390
|
+
// find container element
|
1391
|
+
this.divTree = divContainer;
|
1392
|
+
// create the root element
|
1393
|
+
this.tnRoot = new DynaTreeNode(null, this, {title: this.options.title, key: "root"});
|
1394
|
+
this.tnRoot.data.isFolder = true;
|
1395
|
+
this.tnRoot.render(false, false);
|
1396
|
+
this.divRoot = this.tnRoot.div;
|
1397
|
+
this.divRoot.className = this.options.classNames.container;
|
1398
|
+
// add root to container
|
1399
|
+
this.divTree.appendChild(this.divRoot);
|
1400
|
+
},
|
1401
|
+
|
1402
|
+
// member functions
|
1403
|
+
|
1404
|
+
toString: function() {
|
1405
|
+
return "DynaTree '" + this.options.title + "'";
|
1406
|
+
},
|
1407
|
+
|
1408
|
+
toDict: function() {
|
1409
|
+
return this.tnRoot.toDict(true);
|
1410
|
+
},
|
1411
|
+
|
1412
|
+
getPersistData: function() {
|
1413
|
+
return this.persistence.toDict();
|
1414
|
+
},
|
1415
|
+
|
1416
|
+
logDebug: function(msg) {
|
1417
|
+
if( this.options.debugLevel >= 2 ) {
|
1418
|
+
Array.prototype.unshift.apply(arguments, ["debug"]);
|
1419
|
+
_log.apply(this, arguments);
|
1420
|
+
}
|
1421
|
+
},
|
1422
|
+
|
1423
|
+
logInfo: function(msg) {
|
1424
|
+
if( this.options.debugLevel >= 1 ) {
|
1425
|
+
Array.prototype.unshift.apply(arguments, ["info"]);
|
1426
|
+
_log.apply(this, arguments);
|
1427
|
+
}
|
1428
|
+
},
|
1429
|
+
|
1430
|
+
logWarning: function(msg) {
|
1431
|
+
Array.prototype.unshift.apply(arguments, ["warn"]);
|
1432
|
+
_log.apply(this, arguments);
|
1433
|
+
},
|
1434
|
+
|
1435
|
+
isInitializing: function() {
|
1436
|
+
return ( this.phase=="init" || this.phase=="postInit" );
|
1437
|
+
},
|
1438
|
+
isReloading: function() {
|
1439
|
+
return ( this.phase=="init" || this.phase=="postInit" ) && this.options.persist && this.persistence.cookiesFound;
|
1440
|
+
},
|
1441
|
+
isUserEvent: function() {
|
1442
|
+
return ( this.phase=="userEvent" );
|
1443
|
+
},
|
1444
|
+
|
1445
|
+
redraw: function() {
|
1446
|
+
this.logDebug("dynatree.redraw()...");
|
1447
|
+
this.tnRoot.render(true, true);
|
1448
|
+
this.logDebug("dynatree.redraw() done.");
|
1449
|
+
},
|
1450
|
+
|
1451
|
+
reloadAjax: function() {
|
1452
|
+
// Reload
|
1453
|
+
var opts = this.options;
|
1454
|
+
if( ! opts.initAjax || ! opts.initAjax.url )
|
1455
|
+
throw "tree.reload() requires 'initAjax' mode.";
|
1456
|
+
var pers = this.persistence;
|
1457
|
+
var ajaxOpts = $.extend({}, opts.initAjax);
|
1458
|
+
// Append cookie info to the request
|
1459
|
+
if( ajaxOpts.addActiveKey )
|
1460
|
+
ajaxOpts.data.activeKey = pers.activeKey;
|
1461
|
+
if( ajaxOpts.addFocusedKey )
|
1462
|
+
ajaxOpts.data.focusedKey = pers.focusedKey;
|
1463
|
+
if( ajaxOpts.addExpandedKeyList )
|
1464
|
+
ajaxOpts.data.expandedKeyList = pers.expandedKeyList.join(",");
|
1465
|
+
if( ajaxOpts.addSelectedKeyList )
|
1466
|
+
ajaxOpts.data.selectedKeyList = pers.selectedKeyList.join(",");
|
1467
|
+
|
1468
|
+
// Setup onPostInit callback to be called when Ajax returns
|
1469
|
+
if( opts.onPostInit ) {
|
1470
|
+
if( ajaxOpts.success )
|
1471
|
+
this.tree.logWarning("initAjax: success callback is ignored when onPostInit was specified.");
|
1472
|
+
if( ajaxOpts.error )
|
1473
|
+
this.tree.logWarning("initAjax: error callback is ignored when onPostInit was specified.");
|
1474
|
+
var isReloading = pers.isReloading();
|
1475
|
+
ajaxOpts["success"] = function(dtnode) { opts.onPostInit.call(dtnode.tree, isReloading, false); };
|
1476
|
+
ajaxOpts["error"] = function(dtnode) { opts.onPostInit.call(dtnode.tree, isReloading, true); };
|
1477
|
+
}
|
1478
|
+
this.logDebug("Dynatree._init(): send Ajax request...");
|
1479
|
+
this.tnRoot.appendAjax(ajaxOpts);
|
1480
|
+
},
|
1481
|
+
|
1482
|
+
getRoot: function() {
|
1483
|
+
return this.tnRoot;
|
1484
|
+
},
|
1485
|
+
|
1486
|
+
getNodeByKey: function(key) {
|
1487
|
+
// $("#...") has problems, if the key contains '.', so we use getElementById()
|
1488
|
+
// return $("#" + this.options.idPrefix + key).attr("dtnode");
|
1489
|
+
var el = document.getElementById(this.options.idPrefix + key);
|
1490
|
+
return ( el && el.dtnode ) ? el.dtnode : null;
|
1491
|
+
},
|
1492
|
+
|
1493
|
+
getActiveNode: function() {
|
1494
|
+
return this.activeNode;
|
1495
|
+
},
|
1496
|
+
|
1497
|
+
reactivate: function(setFocus) {
|
1498
|
+
// Re-fire onQueryActivate and onActivate events.
|
1499
|
+
var node = this.activeNode;
|
1500
|
+
if( node ) {
|
1501
|
+
this.activeNode = null; // Force re-activating
|
1502
|
+
node.activate();
|
1503
|
+
if( setFocus )
|
1504
|
+
node.focus();
|
1505
|
+
}
|
1506
|
+
},
|
1507
|
+
|
1508
|
+
getSelectedNodes: function(stopOnParents) {
|
1509
|
+
var nodeList = [];
|
1510
|
+
this.tnRoot.visit(function(dtnode){
|
1511
|
+
if( dtnode.bSelected ) {
|
1512
|
+
nodeList.push(dtnode);
|
1513
|
+
if( stopOnParents == true )
|
1514
|
+
return false; // stop processing this branch
|
1515
|
+
}
|
1516
|
+
});
|
1517
|
+
return nodeList;
|
1518
|
+
},
|
1519
|
+
|
1520
|
+
activateKey: function(key) {
|
1521
|
+
var dtnode = this.getNodeByKey(key);
|
1522
|
+
if( !dtnode ) {
|
1523
|
+
this.activeNode = null;
|
1524
|
+
return null;
|
1525
|
+
}
|
1526
|
+
dtnode.focus();
|
1527
|
+
dtnode.activate();
|
1528
|
+
return dtnode;
|
1529
|
+
},
|
1530
|
+
|
1531
|
+
selectKey: function(key, select) {
|
1532
|
+
var dtnode = this.getNodeByKey(key);
|
1533
|
+
if( !dtnode )
|
1534
|
+
return null;
|
1535
|
+
dtnode.select(select);
|
1536
|
+
return dtnode;
|
1537
|
+
},
|
1538
|
+
|
1539
|
+
enableUpdate: function(bEnable) {
|
1540
|
+
if ( this.bEnableUpdate==bEnable )
|
1541
|
+
return bEnable;
|
1542
|
+
this.bEnableUpdate = bEnable;
|
1543
|
+
if ( bEnable )
|
1544
|
+
this.redraw();
|
1545
|
+
return !bEnable; // return previous value
|
1546
|
+
},
|
1547
|
+
|
1548
|
+
visit: function(fn, data, includeRoot) {
|
1549
|
+
return this.tnRoot.visit(fn, data, includeRoot);
|
1550
|
+
},
|
1551
|
+
|
1552
|
+
_createFromTag: function(parentTreeNode, $ulParent) {
|
1553
|
+
// Convert a <UL>...</UL> list into children of the parent tree node.
|
1554
|
+
var self = this;
|
1555
|
+
/*
|
1556
|
+
TODO: better?
|
1557
|
+
this.$lis = $("li:has(a[href])", this.element);
|
1558
|
+
this.$tabs = this.$lis.map(function() { return $("a", this)[0]; });
|
1559
|
+
*/
|
1560
|
+
$ulParent.find(">li").each(function() {
|
1561
|
+
var $li = $(this);
|
1562
|
+
var $liSpan = $li.find(">span:first");
|
1563
|
+
var title;
|
1564
|
+
if( $liSpan.length ) {
|
1565
|
+
// If a <li><span> tag is specified, use it literally.
|
1566
|
+
title = $liSpan.html();
|
1567
|
+
} else {
|
1568
|
+
// If only a <li> tag is specified, use the trimmed string up to the next child <ul> tag.
|
1569
|
+
title = $li.html();
|
1570
|
+
var iPos = title.search(/<ul/i);
|
1571
|
+
if( iPos>=0 )
|
1572
|
+
title = $.trim(title.substring(0, iPos));
|
1573
|
+
else
|
1574
|
+
title = $.trim(title);
|
1575
|
+
// self.logDebug("%o", title);
|
1576
|
+
}
|
1577
|
+
// Parse node options from ID, title and class attributes
|
1578
|
+
var data = {
|
1579
|
+
title: title,
|
1580
|
+
isFolder: $li.hasClass("folder"),
|
1581
|
+
isLazy: $li.hasClass("lazy"),
|
1582
|
+
expand: $li.hasClass("expanded"),
|
1583
|
+
select: $li.hasClass("selected"),
|
1584
|
+
activate: $li.hasClass("active"),
|
1585
|
+
focus: $li.hasClass("focused")
|
1586
|
+
};
|
1587
|
+
if( $li.attr("title") )
|
1588
|
+
data.tooltip = $li.attr("title");
|
1589
|
+
if( $li.attr("id") )
|
1590
|
+
data.key = $li.attr("id");
|
1591
|
+
// If a data attribute is present, evaluate as a JavaScript object
|
1592
|
+
if( $li.attr("data") ) {
|
1593
|
+
var dataAttr = $.trim($li.attr("data"));
|
1594
|
+
if( dataAttr ) {
|
1595
|
+
if( dataAttr.charAt(0) != "{" )
|
1596
|
+
dataAttr = "{" + dataAttr + "}"
|
1597
|
+
try {
|
1598
|
+
$.extend(data, eval("(" + dataAttr + ")"));
|
1599
|
+
} catch(e) {
|
1600
|
+
throw ("Error parsing node data: " + e + "\ndata:\n'" + dataAttr + "'");
|
1601
|
+
}
|
1602
|
+
}
|
1603
|
+
}
|
1604
|
+
childNode = parentTreeNode.addChild(data);
|
1605
|
+
// Recursive reading of child nodes, if LI tag contains an UL tag
|
1606
|
+
var $ul = $li.find(">ul:first");
|
1607
|
+
if( $ul.length ) {
|
1608
|
+
self._createFromTag(childNode, $ul); // must use 'self', because 'this' is the each() context
|
1609
|
+
}
|
1610
|
+
});
|
1611
|
+
},
|
1612
|
+
|
1613
|
+
_checkConsistency: function() {
|
1614
|
+
// this.logDebug("tree._checkConsistency() NOT IMPLEMENTED - %o", this);
|
1615
|
+
},
|
1616
|
+
|
1617
|
+
// --- end of class
|
1618
|
+
lastentry: undefined
|
1619
|
+
};
|
1620
|
+
|
1621
|
+
/*************************************************************************
|
1622
|
+
* widget $(..).dynatree
|
1623
|
+
*/
|
1624
|
+
|
1625
|
+
$.widget("ui.dynatree", {
|
1626
|
+
init: function() {
|
1627
|
+
// ui.core 1.6 renamed init() to _init(): this stub assures backward compatibility
|
1628
|
+
_log("warn", "ui.dynatree.init() was called; you should upgrade to ui.core.js v1.6 or higher.");
|
1629
|
+
return this._init();
|
1630
|
+
},
|
1631
|
+
|
1632
|
+
_init: function() {
|
1633
|
+
logMsg("Dynatree._init(): version='%s', debugLevel=%o.", DynaTree.version, this.options.debugLevel);
|
1634
|
+
|
1635
|
+
// The widget framework supplies this.element and this.options.
|
1636
|
+
this.options.event += ".dynatree"; // namespace event
|
1637
|
+
|
1638
|
+
var $this = this.element;
|
1639
|
+
var opts = this.options;
|
1640
|
+
// If a 'options.classNames' dictionary was passed, still use defaults
|
1641
|
+
// for undefined classes:
|
1642
|
+
if( opts.classNames !== $.ui.dynatree.defaults.classNames ) {
|
1643
|
+
opts.classNames = $.extend({}, $.ui.dynatree.defaults.classNames, opts.classNames);
|
1644
|
+
}
|
1645
|
+
|
1646
|
+
// Guess skin path, if not specified
|
1647
|
+
if(!opts.imagePath) {
|
1648
|
+
$("script").each( function () {
|
1649
|
+
// TODO: eclipse syntax parser breaks on this expression:
|
1650
|
+
if( this.src.search(/.*dynatree[^/]*\.js$/i) >= 0 ) {
|
1651
|
+
if( this.src.indexOf("/")>=0 ) // issue #47
|
1652
|
+
opts.imagePath = this.src.slice(0, this.src.lastIndexOf("/")) + "/skin/";
|
1653
|
+
else
|
1654
|
+
opts.imagePath = "skin/";
|
1655
|
+
// logMsg("Guessing imagePath from '%s': '%s'", this.src, opts.imagePath);
|
1656
|
+
return false; // first match
|
1657
|
+
}
|
1658
|
+
});
|
1659
|
+
}
|
1660
|
+
// Attach the tree object to parent element
|
1661
|
+
var divContainer = $this.get(0);
|
1662
|
+
|
1663
|
+
// Clear container, in case it contained some 'waiting' or 'error' text
|
1664
|
+
// for clients that don't support JS
|
1665
|
+
if( opts.children || (opts.initAjax && opts.initAjax.url) || opts.initId )
|
1666
|
+
$(divContainer).empty();
|
1667
|
+
|
1668
|
+
// Create the DynaTree object
|
1669
|
+
this.tree = new DynaTree(divContainer, opts);
|
1670
|
+
var root = this.tree.getRoot();
|
1671
|
+
|
1672
|
+
var isReloading = ( opts.persist && this.tree.persistence.isReloading() );
|
1673
|
+
var isLazy = false;
|
1674
|
+
|
1675
|
+
var prevFlag = this.tree.enableUpdate(false);
|
1676
|
+
|
1677
|
+
this.tree.logDebug("Dynatree._init(): read tree structure...");
|
1678
|
+
|
1679
|
+
// Init tree structure
|
1680
|
+
if( opts.children ) {
|
1681
|
+
// Read structure from node array
|
1682
|
+
root.addChild(opts.children);
|
1683
|
+
|
1684
|
+
} else if( opts.initAjax && opts.initAjax.url ) {
|
1685
|
+
// Init tree from AJAX request
|
1686
|
+
isLazy = true;
|
1687
|
+
this.tree.reloadAjax();
|
1688
|
+
|
1689
|
+
} else if( opts.initId ) {
|
1690
|
+
// Init tree from another UL element
|
1691
|
+
this.tree._createFromTag(root, $("#"+opts.initId));
|
1692
|
+
|
1693
|
+
} else {
|
1694
|
+
// Init tree from the first UL element inside the container <div>
|
1695
|
+
var $ul = $this.find(">ul").hide();
|
1696
|
+
this.tree._createFromTag(root, $ul);
|
1697
|
+
$ul.remove();
|
1698
|
+
}
|
1699
|
+
|
1700
|
+
this.tree._checkConsistency();
|
1701
|
+
// Render html markup
|
1702
|
+
this.tree.logDebug("Dynatree._init(): render nodes...");
|
1703
|
+
this.tree.enableUpdate(prevFlag);
|
1704
|
+
|
1705
|
+
// bind event handlers
|
1706
|
+
this.tree.logDebug("Dynatree._init(): bind events...");
|
1707
|
+
this.bind();
|
1708
|
+
|
1709
|
+
// --- Post-load processing
|
1710
|
+
this.tree.logDebug("Dynatree._init(): postInit...");
|
1711
|
+
this.tree.phase = "postInit";
|
1712
|
+
|
1713
|
+
// In persist mode, make sure that cookies are written, even if they are empty
|
1714
|
+
if( opts.persist ) {
|
1715
|
+
this.tree.persistence.write();
|
1716
|
+
}
|
1717
|
+
|
1718
|
+
// Set focus, if possible (this will also fire an event and write a cookie)
|
1719
|
+
if( this.tree.focusNode && this.tree.focusNode.isVisible() ) {
|
1720
|
+
this.tree.logDebug("Focus on init: %o", this.tree.focusNode);
|
1721
|
+
this.tree.focusNode.focus();
|
1722
|
+
}
|
1723
|
+
|
1724
|
+
if( !isLazy && opts.onPostInit ) {
|
1725
|
+
opts.onPostInit.call(this.tree, isReloading, false);
|
1726
|
+
}
|
1727
|
+
|
1728
|
+
this.tree.logDebug("Dynatree._init(): done.");
|
1729
|
+
|
1730
|
+
// this.tree.phase = isLazy ? "waiting" : "idle";
|
1731
|
+
this.tree.phase = "idle";
|
1732
|
+
},
|
1733
|
+
|
1734
|
+
bind: function() {
|
1735
|
+
var $this = this.element;
|
1736
|
+
var o = this.options;
|
1737
|
+
|
1738
|
+
// Prevent duplicate binding
|
1739
|
+
this.unbind();
|
1740
|
+
|
1741
|
+
// Tool function to get dtnode from the event target:
|
1742
|
+
function __getNodeFromElement(el) {
|
1743
|
+
var iMax = 4;
|
1744
|
+
do {
|
1745
|
+
if( el.dtnode ) return el.dtnode;
|
1746
|
+
el = el.parentNode;
|
1747
|
+
} while( iMax-- );
|
1748
|
+
return null;
|
1749
|
+
}
|
1750
|
+
|
1751
|
+
var eventNames = "click.dynatree dblclick.dynatree";
|
1752
|
+
if( o.keyboard ) // Note: leading ' '!
|
1753
|
+
eventNames += " keypress.dynatree keydown.dynatree";
|
1754
|
+
$this.bind(eventNames, function(event){
|
1755
|
+
var dtnode = __getNodeFromElement(event.target);
|
1756
|
+
if( !dtnode )
|
1757
|
+
return true; // Allow bubbling of other events
|
1758
|
+
var prevPhase = dtnode.tree.phase;
|
1759
|
+
dtnode.tree.phase = "userEvent";
|
1760
|
+
try {
|
1761
|
+
dtnode.tree.logDebug("bind(%o): dtnode: %o", event, dtnode);
|
1762
|
+
|
1763
|
+
switch(event.type) {
|
1764
|
+
case "click":
|
1765
|
+
return ( o.onClick && o.onClick(dtnode, event)===false ) ? false : dtnode.onClick(event);
|
1766
|
+
case "dblclick":
|
1767
|
+
return ( o.onDblClick && o.onDblClick(dtnode, event)===false ) ? false : dtnode.onDblClick(event);
|
1768
|
+
case "keydown":
|
1769
|
+
return ( o.onKeydown && o.onKeydown(dtnode, event)===false ) ? false : dtnode.onKeydown(event);
|
1770
|
+
case "keypress":
|
1771
|
+
return ( o.onKeypress && o.onKeypress(dtnode, event)===false ) ? false : dtnode.onKeypress(event);
|
1772
|
+
};
|
1773
|
+
// } catch(e) {
|
1774
|
+
// dtnode.tree.logError("bind(%o): dtnode: %o", event, dtnode);
|
1775
|
+
} finally {
|
1776
|
+
dtnode.tree.phase = prevPhase;
|
1777
|
+
}
|
1778
|
+
});
|
1779
|
+
|
1780
|
+
// focus/blur don't bubble, i.e. are not delegated to parent <div> tags,
|
1781
|
+
// so we use the addEventListener capturing phase.
|
1782
|
+
// See http://www.howtocreate.co.uk/tutorials/javascript/domevents
|
1783
|
+
function __focusHandler(event) {
|
1784
|
+
// Handles blur and focus.
|
1785
|
+
// Fix event for IE:
|
1786
|
+
event = arguments[0] = $.event.fix( event || window.event );
|
1787
|
+
var dtnode = __getNodeFromElement(event.target);
|
1788
|
+
return dtnode ? dtnode.onFocus(event) : false;
|
1789
|
+
}
|
1790
|
+
var div = this.tree.divTree;
|
1791
|
+
if( div.addEventListener ) {
|
1792
|
+
div.addEventListener("focus", __focusHandler, true);
|
1793
|
+
div.addEventListener("blur", __focusHandler, true);
|
1794
|
+
} else {
|
1795
|
+
div.onfocusin = div.onfocusout = __focusHandler;
|
1796
|
+
}
|
1797
|
+
// EVENTS
|
1798
|
+
// disable click if event is configured to something else
|
1799
|
+
// if (!(/^click/).test(o.event))
|
1800
|
+
// this.$tabs.bind("click.tabs", function() { return false; });
|
1801
|
+
|
1802
|
+
},
|
1803
|
+
|
1804
|
+
unbind: function() {
|
1805
|
+
this.element.unbind(".dynatree");
|
1806
|
+
},
|
1807
|
+
|
1808
|
+
/* TODO: we could handle option changes during runtime here (maybe to re-render, ...)
|
1809
|
+
setData: function(key, value) {
|
1810
|
+
this.tree.logDebug("dynatree.setData('" + key + "', '" + value + "')");
|
1811
|
+
},
|
1812
|
+
*/
|
1813
|
+
enable: function() {
|
1814
|
+
this.bind();
|
1815
|
+
// Call default disable(): remove -disabled from css:
|
1816
|
+
$.widget.prototype.enable.apply(this, arguments);
|
1817
|
+
},
|
1818
|
+
|
1819
|
+
disable: function() {
|
1820
|
+
this.unbind();
|
1821
|
+
// Call default disable(): add -disabled to css:
|
1822
|
+
$.widget.prototype.disable.apply(this, arguments);
|
1823
|
+
},
|
1824
|
+
|
1825
|
+
// --- getter methods (i.e. NOT returning a reference to $)
|
1826
|
+
getTree: function() {
|
1827
|
+
return this.tree;
|
1828
|
+
},
|
1829
|
+
|
1830
|
+
getRoot: function() {
|
1831
|
+
return this.tree.getRoot();
|
1832
|
+
},
|
1833
|
+
|
1834
|
+
getActiveNode: function() {
|
1835
|
+
return this.tree.getActiveNode();
|
1836
|
+
},
|
1837
|
+
|
1838
|
+
getSelectedNodes: function() {
|
1839
|
+
return this.tree.getSelectedNodes();
|
1840
|
+
},
|
1841
|
+
|
1842
|
+
// ------------------------------------------------------------------------
|
1843
|
+
lastentry: undefined
|
1844
|
+
});
|
1845
|
+
|
1846
|
+
|
1847
|
+
// The following methods return a value (thus breaking the jQuery call chain):
|
1848
|
+
|
1849
|
+
$.ui.dynatree.getter = "getTree getRoot getActiveNode getSelectedNodes";
|
1850
|
+
|
1851
|
+
|
1852
|
+
// Plugin default options:
|
1853
|
+
|
1854
|
+
$.ui.dynatree.defaults = {
|
1855
|
+
title: "Dynatree root", // Name of the root node.
|
1856
|
+
rootVisible: false, // Set to true, to make the root node visible.
|
1857
|
+
minExpandLevel: 1, // 1: root node is not collapsible
|
1858
|
+
imagePath: null, // Path to a folder containing icons. Defaults to 'skin/' subdirectory.
|
1859
|
+
children: null, // Init tree structure from this object array.
|
1860
|
+
initId: null, // Init tree structure from a <ul> element with this ID.
|
1861
|
+
initAjax: null, // Ajax options used to initialize the tree strucuture.
|
1862
|
+
autoFocus: true, // Set focus to first child, when expanding or lazy-loading.
|
1863
|
+
keyboard: true, // Support keyboard navigation.
|
1864
|
+
persist: false, // Persist expand-status to a cookie
|
1865
|
+
autoCollapse: false, // Automatically collapse all siblings, when a node is expanded.
|
1866
|
+
clickFolderMode: 3, // 1:activate, 2:expand, 3:activate and expand
|
1867
|
+
activeVisible: true, // Make sure, active nodes are visible (expanded).
|
1868
|
+
checkbox: false, // Show checkboxes.
|
1869
|
+
selectMode: 2, // 1:single, 2:multi, 3:multi-hier
|
1870
|
+
fx: null, // Animations, e.g. null or { height: "toggle", duration: 200 }
|
1871
|
+
|
1872
|
+
// Low level event handlers: onEvent(dtnode, event): return false, to stop default processing
|
1873
|
+
onClick: null, // null: generate focus, expand, activate, select events.
|
1874
|
+
onDblClick: null, // (No default actions.)
|
1875
|
+
onKeydown: null, // null: generate keyboard navigation (focus, expand, activate).
|
1876
|
+
onKeypress: null, // (No default actions.)
|
1877
|
+
onFocus: null, // null: set focus to node.
|
1878
|
+
onBlur: null, // null: remove focus from node.
|
1879
|
+
|
1880
|
+
// Pre-event handlers onQueryEvent(flag, dtnode): return false, to stop processing
|
1881
|
+
onQueryActivate: null, // Callback(flag, dtnode) before a node is (de)activated.
|
1882
|
+
onQuerySelect: null, // Callback(flag, dtnode) before a node is (de)selected.
|
1883
|
+
onQueryExpand: null, // Callback(flag, dtnode) before a node is expanded/collpsed.
|
1884
|
+
|
1885
|
+
// High level event handlers
|
1886
|
+
onPostInit: null, // Callback(isReloading, isError) when tree was (re)loaded.
|
1887
|
+
onActivate: null, // Callback(dtnode) when a node is activated.
|
1888
|
+
onDeactivate: null, // Callback(dtnode) when a node is deactivated.
|
1889
|
+
onSelect: null, // Callback(flag, dtnode) when a node is (de)selected.
|
1890
|
+
onExpand: null, // Callback(dtnode) when a node is expanded/collapsed.
|
1891
|
+
onLazyRead: null, // Callback(dtnode) when a lazy node is expanded for the first time.
|
1892
|
+
|
1893
|
+
ajaxDefaults: { // Used by initAjax option
|
1894
|
+
cache: false, // false: Append random '_' argument to the request url to prevent caching.
|
1895
|
+
dataType: "json" // Expect json format and pass json object to callbacks.
|
1896
|
+
},
|
1897
|
+
strings: {
|
1898
|
+
loading: "Loading…",
|
1899
|
+
loadError: "Load error!"
|
1900
|
+
},
|
1901
|
+
idPrefix: "ui-dynatree-id-", // Used to generate node id's like <span id="ui-dynatree-id-<key>">.
|
1902
|
+
// cookieId: "ui-dynatree-cookie", // Choose a more unique name, to allow multiple trees.
|
1903
|
+
cookieId: "dynatree", // Choose a more unique name, to allow multiple trees.
|
1904
|
+
cookie: {
|
1905
|
+
expires: null //7, // Days or Date; null: session cookie
|
1906
|
+
// path: "/", // Defaults to current page
|
1907
|
+
// domain: "jquery.com",
|
1908
|
+
// secure: true
|
1909
|
+
},
|
1910
|
+
// Class names used, when rendering the HTML markup.
|
1911
|
+
// Note: if only single entries are passed for options.classNames, all other
|
1912
|
+
// values are still set to default.
|
1913
|
+
classNames: {
|
1914
|
+
container: "ui-dynatree-container",
|
1915
|
+
folder: "ui-dynatree-folder",
|
1916
|
+
document: "ui-dynatree-document",
|
1917
|
+
|
1918
|
+
empty: "ui-dynatree-empty",
|
1919
|
+
vline: "ui-dynatree-vline",
|
1920
|
+
expander: "ui-dynatree-expander",
|
1921
|
+
connector: "ui-dynatree-connector",
|
1922
|
+
checkbox: "ui-dynatree-checkbox",
|
1923
|
+
nodeIcon: "ui-dynatree-icon",
|
1924
|
+
title: "ui-dynatree-title",
|
1925
|
+
|
1926
|
+
nodeError: "ui-dynatree-statusnode-error",
|
1927
|
+
nodeWait: "ui-dynatree-statusnode-wait",
|
1928
|
+
hidden: "ui-dynatree-hidden",
|
1929
|
+
combinedExpanderPrefix: "ui-dynatree-exp-",
|
1930
|
+
combinedIconPrefix: "ui-dynatree-ico-",
|
1931
|
+
// disabled: "ui-dynatree-disabled",
|
1932
|
+
hasChildren: "ui-dynatree-has-children",
|
1933
|
+
active: "ui-dynatree-active",
|
1934
|
+
selected: "ui-dynatree-selected",
|
1935
|
+
expanded: "ui-dynatree-expanded",
|
1936
|
+
lazy: "ui-dynatree-lazy",
|
1937
|
+
focused: "ui-dynatree-focused",
|
1938
|
+
partsel: "ui-dynatree-partsel",
|
1939
|
+
lastsib: "ui-dynatree-lastsib"
|
1940
|
+
},
|
1941
|
+
debugLevel: 1,
|
1942
|
+
|
1943
|
+
// ------------------------------------------------------------------------
|
1944
|
+
lastentry: undefined
|
1945
|
+
};
|
1946
|
+
|
1947
|
+
/**
|
1948
|
+
* Reserved data attributes for a tree node.
|
1949
|
+
*/
|
1950
|
+
$.ui.dynatree.nodedatadefaults = {
|
1951
|
+
title: null, // (required) Displayed name of the node (html is allowed here)
|
1952
|
+
key: null, // May be used with activate(), select(), find(), ...
|
1953
|
+
isFolder: false, // Use a folder icon. Also the node is expandable but not selectable.
|
1954
|
+
isLazy: false, // Call onLazyRead(), when the node is expanded for the first time to allow for delayed creation of children.
|
1955
|
+
tooltip: null, // Show this popup text.
|
1956
|
+
icon: null, // Use a custom image (filename relative to tree.options.imagePath). 'null' for default icon, 'false' for no icon.
|
1957
|
+
addClass: null, // Class name added to the node's span tag.
|
1958
|
+
activate: false, // Initial active status.
|
1959
|
+
focus: false, // Initial focused status.
|
1960
|
+
expand: false, // Initial expanded status.
|
1961
|
+
select: false, // Initial selected status.
|
1962
|
+
hideCheckbox: false, // Suppress checkbox display for this node.
|
1963
|
+
unselectable: false, // Prevent selection.
|
1964
|
+
// disabled: false,
|
1965
|
+
// The following attributes are only valid if passed to some functions:
|
1966
|
+
children: null, // Array of child nodes.
|
1967
|
+
// NOTE: we can also add custom attributes here.
|
1968
|
+
// This may then also be used in the onActivate(), onSelect() or onLazyTree() callbacks.
|
1969
|
+
// ------------------------------------------------------------------------
|
1970
|
+
lastentry: undefined
|
1971
|
+
};
|
1972
|
+
|
1973
|
+
|
1974
|
+
// ---------------------------------------------------------------------------
|
1975
|
+
})(jQuery);
|